html-entities icon indicating copy to clipboard operation
html-entities copied to clipboard

perf: slice is faster

Open cesco69 opened this issue 3 months ago • 0 comments

https://www.measurethat.net/Benchmarks/Show/2335/1/slice-vs-substr-vs-substring-with-no-end-index#latest_results_block

slice x 25,768,061 ops/sec ±10.38% (42 runs sampled)
substr x 23,764,229 ops/sec ±8.05% (42 runs sampled)
substring x 24,512,322 ops/sec ±10.47% (29 runs sampled)

cesco69 avatar Sep 19 '25 14:09 cesco69