Thanks for the replies!
Yeah this part is very important that it is as fast as possible, so decided to go with the ugly version for now.

Also glad to see a fellow companion who likes statistics, not a lot of us around! ;)

Adam, I tried that and it did reduce the problem somewhat. That's what got me thinking that it might be the double lookup being one of the problems with the pipeline version.

By on 11/21/2011 3:04 AM ()

Can you reduce <bunch of math> to a simple computation or a constant and see how that changes things?

By on 11/4/2011 12:28 PM ()

Glad to know you are using F#! I myself studied economics (statistics was the essential part) before moving on to coding F#. Statistics is fun!

F# is not terribly good at eliminating abstractions (as compared, to, say, GHC Haskell) so hand-written versions are typically a lot faster. The question is - is this part of the code really critical for overall performance? If yes, I would just use the ugly version.

I cannot spot any obvious deficiencies in the pipeline version. It does do more memory allocation, but if "<bunch of math>" takes enough time it should be negligible.

Have you tried running with `#time` and looking at GC statistics?

By on 11/3/2011 10:20 AM ()
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