Closed lppedd closed 6 months ago
@ftomassetti the code looks "worse" than before, but the benefits are pretty amazing for StringCharStream
.
On my laptop - with a 4 megabytes file - I get:
Target | Before | After |
---|---|---|
JVM | 11.529621 ms | 4.075896 ms |
JS | 41.52782 ms | 25.09781 ms |
WASM | 109.095989 ms | 40.703107 ms |
mingwX64 | 19.490488 ms | 8.587009 ms |
Ken mentioned performance in the email, and I think we have a lot of room for improvement.
Many micro-optimizations summed together might give us quite a boost.
Added a few minor comments
Thank you @lppedd
The optimizations done for
StringCharStream
reduce up to half the time spent indexing code points in very large strings.I've tested it with 4+ megabytes text files.