Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
builtin: speed up string concatenation and
repeat()
method with vme…
…mcpy instead of `for` loop for copying data (#18206) These changes almost do not speed up the program with the `-prod` flag, since modern С compilers can do such optimization on their own, but in normal mode, the performance gain is from 1.6 (concatenation) to 1.8 (repeat) times. Concatenation: Old (`for` loop): Time (mean): 3.699 s +- 0.071 s [User: 3.629 s, System: 0.069 s] Range (min ... max): 3.548 s ... 3.741 s 10 runs New (vmemcpy): Time (mean): 2.305 s +- 0.065 s [User: 2.263 s, System: 0.041 s] Range (min ... max): 2.172 s ... 2.355 s 10 runs `vmemcpy version` ran 1.60 +- 0.05 times faster than 'for loop version'
- Loading branch information