This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Faster string to integer conversion


Thanks for thinking about this. Certainly strtol etc. could be sped up and the approach you mention might be a win; it's hard to say, given its setup overhead. In practice most integers are small, and you'd need to benchmark the approach on a set of integers that are of "typical" size. It may well be more work to come up with a convincing benchmark than to come up with the actual code.

If you're interested in strtol speedup ideas, how about this one? Jettison tables like __strtol_ul_max_tab and replace their uses with invocations of the INT_ADD_WRAPV macro defined by the following recently-proposed patch:

https://sourceware.org/ml/libc-alpha/2016-04/msg00174.html


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]