Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
koolba
on Sept 28, 2022
|
parent
|
context
|
favorite
| on:
Minimize Heap Allocations in Node.js
> For example even though `s.slice(1)` is a "copy" most engines (I believe V8 included) will use the same backing string for both.
That’s not a copy, it skips the first character!
kevincox
on Sept 28, 2022
[–]
It's semantically a copy of most of the string.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search:
That’s not a copy, it skips the first character!