Added NumString, usize based string#21
Conversation
Wicpar
commented
Dec 25, 2022
- Added usize based string
- Added it to benchmarks
- it's a LOT faster than SmallString.
- still missing most functions and a bit of docs, but nothing to large, just copy paste the array_string ones.
…enchmark. At least 50% performance over array_string
|
Pretty cool trick, seems promising! Does that also work with u128, and possibly with multiple fields? So we can get a bigger string than 8 ASCII characters? Is usize instead of u64 intentional btw? There seems to be a lot of future in this! |
|
Usize guarantees maximum speed as it will always be a register. |
|
In my benchmark it took 1 cycle to copy, 4 cycles to from_str, 5 cycles to push_str. It would also be worth it to test on terget arch=native, and maybe even with avx 2 256 bit registers. (512 is just too rare to test) |