Hmmm… its kinda challenging to find a method for reading/writing data faster enough to get ACCEPTED in this problem ( https://www.spoj.pl/problems/INTEST/ ) using F#.
My code ( http://paste.ubuntu.com/548748/ ) gets TLE…
Any ideas how to speed up data reading?
This version of mine passes the time limit (but is still terribly slow ~14 seconds):
Though the bottle-neck of this version is actually
string -> uint32conversion (standard uint32 cast from string is even slower) the reading itself takes around 2 sec (vs 6 sec of total time) on my sample input (~100M file) – still not a great result. Onces2iis rewritten in imperative style, the total run-time can be reduced to 10 sec on spoj: