jvm - Are there any advantages of using Chronicle Map for java.util.String over .`intern` method for the purpose of lowering heap usage? -


intention reduce old gen size in order lower gc pauses.

in understanding chronicle map store objects in native space , (starting java 8) string#intern same because interned string in metaspace.

i curious whenever need use chronicle map, or it's ok stick intern method.

chroniclemap couldn't serve direct replacement of string.intern() because java.lang.string instances on-heap. won't win anything, storing strings in chroniclemap, because before using them deserialize them on-heap object.

chroniclemap data structure, (not java implementation, maybe c++) indeed used sort of caching textual data, inter-process. suspect far seeking. example on java side, require separate value class (not string , not stringbuilder), implementing charsequence @ best.

also, don't need intern, deduplication more effective, see java.lang.string catechism talk, "intern" section.


Comments

Popular posts from this blog

python - No exponential form of the z-axis in matplotlib-3D-plots -

php - Best Light server (Linux + Web server + Database) for Raspberry Pi -

c# - "Newtonsoft.Json.JsonSerializationException unable to find constructor to use for types" error when deserializing class -