tfussell / xlnt

:bar_chart: Cross-platform user-friendly xlsx library for C++11+
Other
1.5k stars 423 forks source link

PERF: locale string functions #203

Closed chris-b1 closed 7 years ago

chris-b1 commented 7 years ago

It appears reference_split is a very hot path, specifically the locale based string functions https://github.com/tfussell/xlnt/blob/master/source/cell/cell_reference.cpp#L125

Seems like the more basic ones from <cctype> could be used here?

chris-b1 commented 7 years ago

Not sure this is scientific, but somewhat interesting micro-benchmark http://quick-bench.com/7EybEgsCsfhSXrmrMcl9YTljYyI#

tfussell commented 7 years ago

That's a significant difference. It was some of the earliest code I wrote for the library so it hasn't seen much optimization yet. It's useful to know that there's lots of performance to be gained there. Thanks for the contribution. I'll make a comment here once I've made progress on this.