rust-js / rjs

Rust JavaScript interpreter
98 stars 6 forks source link

JsString.from_u16 creates an unnecessary copy of its input #84

Open pvginkel opened 9 years ago

pvginkel commented 9 years ago

JsString.from_u16 is called a lot while taking a reference to memory on the GC heap. Because this function allocates, it first copies the input onto the native heap. This copy must be removed.