Descent3 icon indicating copy to clipboard operation
Descent3 copied to clipboard

Refactor CleanupStr in misc/pstring.cpp

Open Nakhr11n opened this issue 1 year ago • 1 comments

Depends on #197.

Nakhr11n avatar Apr 27 '24 19:04 Nakhr11n

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

Nakhr11n avatar Apr 27 '24 19:04 Nakhr11n

I'd vote for my C implementation as it faster no matter of what, but let's hear what others thinks.

winterheart avatar Apr 28 '24 01:04 winterheart

I've tested changes and all OK, thanks!

winterheart avatar Apr 30 '24 21:04 winterheart