Following recent bug findings, anybody up for a TryStrToFloat mini "fast code" challenge ?

Following recent bug findings, anybody up for a TryStrToFloat mini "fast code" challenge ?

You could contribute in two ways:
- code implementations :)
- testing material !

Testing material would be either special cases or datasets of actual float strings you encounter in the field (ideally streamlined in "one float per line" plain text files)

The aim would be performance while being "as good as" historical 32bits StrToFloat on both Delphi 32 and 64 bit compilers in terms of precision.
So without C's strtod correctness requirements, as that would be staring at an abyss of complexity I assume very few of us need (cf. http://www.exploringbinary.com/how-strtod-works-and-sometimes-doesnt/ for a peek at the abyss)

Comments

  1. I assume this is Pascal only - compilable to both x86 and x64?

    Or are we talking about two assembly versions?

    ReplyDelete
  2. Hallvard Vassbotn I guess it could be all these if there is a will and enough manpower, but I guess in terms of priority, it would be Pascal (cross platform), x64 (platform of choice for higher performance) and x86 (last because legacy).

    My benchmark identified bottlenecks around mantissa parsing and exponentiation, but it's probably not running on very representative strings.

    ReplyDelete
  3. Get FastCode back is a nice idea. maybe we can find some ways to sponsor it? Jim McKeeth?

    ReplyDelete
  4. I'm open to ideas and helping however possible. Let me know!

    ReplyDelete

Post a Comment