{"id":272,"date":"2011-06-03T10:18:22","date_gmt":"2011-06-03T10:18:22","guid":{"rendered":"https:\/\/kari.world.ikari.fi\/2011\/06\/03\/optimized-strings-who-knows-possibly\/"},"modified":"2011-06-03T10:18:22","modified_gmt":"2011-06-03T10:18:22","slug":"optimized-strings-who-knows-possibly","status":"publish","type":"post","link":"https:\/\/kari.world.ikari.fi\/?p=272","title":{"rendered":"Optimized Strings &#8211; Who knows, possibly"},"content":{"rendered":"<p>JVM seems to include few new intesting optimization options<br \/>\n<code>-XX:+UseCompressedStrings<\/code><br \/>\n<code>-XX:+OptimizeStringConcat<\/code><br \/>\n<code>-XX:+UseStringCache<\/code><\/p>\n<p>Why these sounds interesting. Well, simply because strings are among the biggest memory consumers, and string manipulations like concat tends to be relatively slow.<\/p>\n<p><b>Update:<\/b><br \/>\n<a href=\"http:\/\/bugs.sun.com\/view_bug.do?bug_id=6904191\">OptimizeStringConcat is in JDK 1.6.0_18<\/a><\/p>\n<p><b>References:<\/b><br \/>\n<a href=\"http:\/\/thevirtualmachinist.blogspot.com\/2010\/12\/xxusecompressedstrings-explained.html\">The Virtual Machinist: -XX:+UseCompressedStrings explained<\/a><br \/>\n<a href=\"http:\/\/groups.google.com\/group\/jvm-languages\/browse_thread\/thread\/2ad54161f793f378?pli=1\">Google Groups: Description of -XX:+OptimizeStringConcat ?<\/a><br \/>\n<a href=\"http:\/\/stackoverflow.com\/questions\/1049983\/jvm-xxstringcache-argument\">Stackoverflow: JVM -XX:+StringCache argument?<\/a><br \/>\n<a href=\"http:\/\/www.oracle.com\/technetwork\/java\/javase\/tech\/vmoptions-jsp-140102.html\">Oracle: Java HotSpot VM Options<\/a><br \/>\n<a href=\"https:\/\/kari.world.ikari.fi\/2010\/06\/12\/converting-string-to-utf8\/\">Kari&#8217;s World: Converting String to UTF8?<\/a><br \/>\n<a href=\"https:\/\/kari.world.ikari.fi\/2010\/01\/12\/compact-string-dictionary\/\">Kari&#8217;s World: Compact String Dictionary<\/a><br \/>\n<a href=\"https:\/\/kari.world.ikari.fi\/2009\/12\/16\/string-magic\/\">Kari&#8217;s World: String Magic<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>JVM seems to include few new intesting optimization options -XX:+UseCompressedStrings -XX:+OptimizeStringConcat -XX:+UseStringCache Why these sounds interesting. Well, simply because strings are among the biggest memory consumers, and string manipulations like concat tends to be relatively slow. Update: OptimizeStringConcat is in JDK 1.6.0_18 References: The Virtual Machinist: -XX:+UseCompressedStrings explained Google Groups: Description of -XX:+OptimizeStringConcat ? Stackoverflow:&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[],"class_list":["post-272","post","type-post","status-publish","format-standard","hentry","category-java"],"_links":{"self":[{"href":"https:\/\/kari.world.ikari.fi\/index.php?rest_route=\/wp\/v2\/posts\/272","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kari.world.ikari.fi\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kari.world.ikari.fi\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kari.world.ikari.fi\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kari.world.ikari.fi\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=272"}],"version-history":[{"count":0,"href":"https:\/\/kari.world.ikari.fi\/index.php?rest_route=\/wp\/v2\/posts\/272\/revisions"}],"wp:attachment":[{"href":"https:\/\/kari.world.ikari.fi\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=272"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kari.world.ikari.fi\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=272"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kari.world.ikari.fi\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=272"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}