rusty_v8
rusty_v8 copied to clipboard
perf: speed up v8::String::to_rust_*_lossy()
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.