3 ms·
Heck, even in Java, String.split returns shared references (with different offsets) to the same backing byte array. Mind you, that can bite you pretty hard if
by phyzome 8y ago
Heck, even in Java, String.split returns shared references (with different offsets) to the same backing byte array.
Mind you, that can bite you pretty hard if you're taking in giant documents, splitting down to a few tiny tokens, and then holding those tiny tokens in a long-lived in-memory cache (ugh, voice of experience here) but most of the time that's the Right Thing.