Descent3
Descent3 copied to clipboard
Refactor CleanupStr in misc/pstring.cpp
Depends on #197.
Here are some benchmarks:
| Benchmark -O3 | Time | CPU | Iterations |
|---|---|---|---|
| Original | 217 ns | 217 ns | 3231907 |
| New | 85.7 ns | 85.3 ns | 8203981 |
| Benchmark -O0 | Time | CPU | Iterations |
|---|---|---|---|
| Original | 278 ns | 276 ns | 2511607 |
| New | 98.5 ns | 97.7 ns | 7093489 |
I'd vote for my C implementation as it faster no matter of what, but let's hear what others thinks.
I've tested changes and all OK, thanks!