The JIT in the CLR is very sensitive to the exact format of iterating over an array regarding when it can optimize away the index boundary checks. Can you try using the form

for i in 0 to arrayValue.Length - 1 do

and check the result? (Also ensure you are in 'release' mode or compiling with optimizations enabled.)

By on 11/4/2009 12:34 PM ()

Thank you, with your recommendations code completes in 900ms. Code modification was

...

let arrUpperBound = arr.Length - 1

....

for i = 0 to arrUpperBound do

...

By on 11/4/2009 12:49 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