rusty_v8 icon indicating copy to clipboard operation
rusty_v8 copied to clipboard

perf: speed up v8::String::to_rust_*_lossy()

Open lucacasonato opened this issue 1 year ago • 1 comments

This commit speeds up this common conversion method between by 2x for many common cases. Short one byte ASCII strings are now 20% faster. Longer one byte ASCII strings are 2.5x faster. Short UTF8 strings are marginally slower (5%) but longer UTF8 strings are upwards of 2x faster.

A follow up will make the short UTF8 strings about 2x faster than the current implementation as well.

lucacasonato avatar Oct 18 '24 17:10 lucacasonato