ValF() is about 1000 times slower than in PB 4.51
Code: Select all
t = ElapsedMilliseconds()
For i = 1 To 10000
a = ValF("1.5")
Next i
Debug ElapsedMilliseconds() - t
Code: Select all
t = ElapsedMilliseconds()
For i = 1 To 10000
a = ValF("1.5")
Next i
Debug ElapsedMilliseconds() - t
Code: Select all
t = ElapsedMilliseconds()
For i = 1 To 10000
a = ValF("1.5")
Next i
MessageRequester("", Str(ElapsedMilliseconds() - t))
Only takes 15 ms on my old XP PC with 4.61 installed. Try a fresh install of PureBasic 4.61 in a new folder and test again.Niffo wrote:The code below takes about 10 seconds to execute on PB 4.61 on my machine
Code: Select all
#ifdef WINDOWS
setlocale(LC_NUMERIC, "English");
#endif
Fred wrote:We now always set the locale:
because of this bug: http://www.purebasic.fr/english/viewtop ... 4&start=30Code: Select all
#ifdef WINDOWS setlocale(LC_NUMERIC, "English"); #endif
Wine has probably a slow way to do it, but that's mainly a Wine problem. I will try to see if getting the locale, compare it and only change it if necessary is faster.
Don't refer to something if people can't read itYou are not authorised to read this forum.