Hacker News new | ask | show | jobs
by valand 472 days ago
Fun fact, V8 interns strings! But it doesn't seem to intern big ones.
1 comments

Many VMs do. The JVM was one of the first to do this extensively - all strings are in a "constant pool" as part of the .class format, and then they're referenced by index in instructions. Python does it for strings that appear in source code, and you can force it for runtime data with sys.intern().