I looked into creating D implementations of equivalent functions to strtold, etc. to address bug 3758 (http://d.puremagic.com/issues/show_bug.cgi?id=3758). It seems like converting strings to floats is actually pretty hard to do right, i.e. without any loss of precision. However, the inefficiency of requiring several heap allocations per conversions hurts when reading in large files. From some measurements I did, it seems like the heap allocation and associated garbage collection is the bigger source of overhead than the string copying. Is everyone ok with me optimizing std.conv.parse to place the zero-terminated version of the string on the stack if it's reasonably small as a temporary fix?
_______________________________________________
phobos mailing list
[email protected]
http://lists.puremagic.com/mailman/listinfo/phobos

Reply via email to