4 ms·
The problem with that is every time you create a string you have to do the work to look it up in the cache. The benefit of the JVM's approach here is that it on
by chrisseaton 12y ago
The problem with that is every time you create a string you have to do the work to look it up in the cache. The benefit of the JVM's approach here is that it only bothers to deduplicate it if it is long-lived enough to be evacuated.
- mbq 12y agoSure; in R strings are copied way more frequently than created, so it pays off.