Hi Paul,

It appears your JavaScript Set uses something similar to a HashSet while WebSharper code uses a purely functional Set. The later simply can't compete on a use case where HashSet would suffice. Can't compete even in F#, let alone in JavaScript, Set is too general. Even if you used fast sets, your code has some other performance anti-patterns, for example this allocates a list (slow):

1
2
3
4
       [   for i in -1..1 do
           for j in -1..1 do
               yield a+i, b+j
       ] |> Set.ofList

You can always match pure JS performance in WebSharper by dropping to pure JavaScript in performance-critical code. Our collections are primarily slower because they are more general.

That being said, it certainly might be the case that some of our collections / standard library code can be improved. I will be glad to review specific code for performance if you could narrow it down a bit.

Same goes for the crash problem, it would be nice to know more details.

Anton

By on 10/30/2012 8:03 PM ()
IntelliFactory Offices Copyright (c) 2011-2012 IntelliFactory. All rights reserved.
Home | Products | Consulting | Trainings | Blogs | Jobs | Contact Us | Terms of Use | Privacy Policy | Cookie Policy
Built with WebSharper