carfield.com.hkintern.txt2021-02-24T03:49:26Z2021-02-24T03:49:26Z<br/>String.intern() is designed for constant strings, it's implemented in C/C++ in the hotspot core code, and it has a fixed-size hashmap of around 20K entries and if more than this number of strings are interned, the performance degrades linearly since there are hash collisions and the code has to search down linked lists.<br/><br/><a href="http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6988220">http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6988220</a> <br/><br/>String.intern in Java 7 and 8 - <a href="http://java-performance.info/string-intern-in-java-6-7-8/">http://java-performance.info/string-intern-in-java-6-7-8/</a> <a href="http://java-performance.info/string-intern-java-6-7-8-multithreaded-access/">http://java-performance.info[..]-intern-java-6-7-8-multithreaded-access/</a> <a href="http://java-performance.info/string-intern-java-7-8-part-3/">http://java-performance.info/string-intern-java-7-8-part-3/</a> <br/><br/>Suggestion of improving string decoding - <a href="https://cl4es.github.io/2021/02/23/Faster-Charset-Decoding.html">https://cl4es.github.io/2021/02/23/Faster-Charset-Decoding.html</a> <br/><br/><script type="text/javascript"><!--google_ad_client = "pub-9426659565807829";google_ad_slot = "9359905831";google_ad_width = 728;google_ad_height = 15;//--></script><script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>2021-02-24T03:49:26Zconstruction.txt2021-01-06T12:49:46Z2021-01-06T12:49:46Z<br/>Java's String.repeat Method in Action: Building PreparedStatement with Dynamic Number of Parameters - <a href="https://marxsoftware.blogspot.com/2020/12/jdk11-string-repeat-preparedstatement.html">https://marxsoftware.blogspot.com[..]k11-string-repeat-preparedstatement.html</a> <br/><br/><script type="text/javascript"><!--google_ad_client = "pub-9426659565807829";google_ad_slot = "9359905831";google_ad_width = 728;google_ad_height = 15;//--></script><script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>2021-01-06T12:49:46Zsubstring.txt2019-06-10T12:13:52Z2019-06-10T12:13:52Z<br/>Substring no longer just change offset - <a href="http://www.javaadvent.com/2012/12/changes-to-stringsubstring-in-java-7.html">http://www.javaadvent.com[..]hanges-to-stringsubstring-in-java-7.html</a> <br/><br/><a href="https://cl4es.github.io/2019/05/14/String-Concat-Redux.html">https://cl4es.github.io/2019/05/14/String-Concat-Redux.html</a> <br/><br/><script type="text/javascript"><!--google_ad_client = "pub-9426659565807829";google_ad_slot = "9359905831";google_ad_width = 728;google_ad_height = 15;//--></script><script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>2019-06-10T12:13:52Zregex.txt2017-03-25T16:09:52Z2017-03-25T16:09:52Z<br/>Introduction to a library which support faster regular expression processing: <a href="http://weblogs.java.net/blog/tomwhite/archive/2006/03/a_faster_java_r.html">http://weblogs.java.net[..]ite/archive/2006/03/a_faster_java_r.html</a> <a href="http://www.javaadvent.com/2015/12/java-regular-expression-library-benchmarks-2015.html">http://www.javaadvent.com[..]-expression-library-benchmarks-2015.html</a> <br/><br/>Regex helper - <a href="https://github.com/VerbalExpressions/JavaVerbalExpressions">https://github.com/VerbalExpressions/JavaVerbalExpressions</a> <br/><br/>java-regular-expressions-cheat-sheet - <a href="https://zeroturnaround.com/rebellabs/java-regular-expressions-cheat-sheet">https://zeroturnaround.com[..]abs/java-regular-expressions-cheat-sheet</a> <br/><br/><script type="text/javascript"><!--google_ad_client = "pub-9426659565807829";google_ad_slot = "9359905831";google_ad_width = 728;google_ad_height = 15;//--></script><script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>2017-03-25T16:09:52Zcomparison.txt2014-07-23T01:57:03Z2014-07-23T01:57:03Z<br/>Better sorting should do 2 things:<br/>1) case insensitive<br/>2) aware of numbers in the file names. So File2 comes after File1 (obviously) but before File10<br/><br/><a href="http://jroller.com/page/tfenne?entry=humanestringcomparator_sorting_strings_for_people">http://jroller.com[..]ingcomparator_sorting_strings_for_people</a> <br/><br/>source: <a href="http://jroller.com/resources/t/tfenne/HumaneStringComparator.java">http://jroller.com/resources/t/tfenne/HumaneStringComparator.java</a> <br/><br/>Switch comparison - <a href="http://java-performance.info/string-switch-performance/">http://java-performance.info/string-switch-performance/</a> <br/><br/><script type="text/javascript"><!--google_ad_client = "pub-9426659565807829";google_ad_slot = "9359905831";google_ad_width = 728;google_ad_height = 15;//--></script><script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>2014-07-23T01:57:03Zunicode.txt2013-12-02T03:47:12Z2013-12-02T03:47:12Z<br/>A common issue of Windows environment and the workaround - <a href="http://jroller.com/page/ff?entry=java_utf_8_bug_grief">http://jroller.com/page/ff?entry=java_utf_8_bug_grief</a> <br/><br/>Strange String issues in JVM languages, don't trust all string operations all the time! <a href="https://sites.google.com/a/athaydes.com/renato-athaydes/posts/strangestringissuesinjvmlanguages">https://sites.google.com[..]/posts/strangestringissuesinjvmlanguages</a> <a href="http://mortoray.com/2013/11/27/the-string-type-is-broken/">http://mortoray.com/2013/11/27/the-string-type-is-broken/</a> <br/><br/><script type="text/javascript"><!--google_ad_client = "pub-9426659565807829";google_ad_slot = "9359905831";google_ad_width = 728;google_ad_height = 15;//--></script><script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>2013-12-02T03:47:12Zalignment.txt2013-11-22T09:04:49Z2013-11-22T09:04:49Z<br/>Discussion of how to do string alignment - <a href="http://manycupsofcoffee.blogspot.com.au/2013/04/java-implementation-of-optimal-string.html">http://manycupsofcoffee.blogspot.com.au[..]va-implementation-of-optimal-string.html</a> <br/><br/><script type="text/javascript"><!--google_ad_client = "pub-9426659565807829";google_ad_slot = "9359905831";google_ad_width = 728;google_ad_height = 15;//--></script><script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>2013-11-22T09:04:49Zstringbuffer.txt2012-10-02T12:31:57Z2012-10-02T12:31:57Z<br/>In core libraries like StringBuffer we should prefer the lesser evil of code duplication to the loss of performance. - <a href="http://old.nabble.com/RFR%3A-6206780-(str)-Forwarding-append-methods-in-String%7BBuffer,-Builder%7D-are-inconsistent-td34479926.html">http://old.nabble.com[..]lder%7D-are-inconsistent-td34479926.html</a> <br/><br/><script type="text/javascript"><!--google_ad_client = "pub-9426659565807829";google_ad_slot = "9359905831";google_ad_width = 728;google_ad_height = 15;//--></script><script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>2012-10-02T12:31:57ZtoString.txt2006-02-07T10:56:48Z2006-02-07T10:56:48Z<br/>Nice and simple toString(): <br/><pre><br/> public String toString() {<br/><br/> return MyClass.class.getSimpleName()<br/><br/> + new LinkedHashMap<Object, Object>() {{<br/><br/> put("foo", foo);<br/><br/> put("bar", bar);<br/><br/> put("tee", tee);<br/><br/> }};<br/><br/> }<br/></pre><br/>Results in:<br/><br/> MyClass[foo: fooValue, bar: barValue, tee: teeValue]<br/><br/><a href="http://crazybob.org/2006/02/simple-tostring-hack.html">http://crazybob.org/2006/02/simple-tostring-hack.html</a> <br/><br/><script type="text/javascript"><!--google_ad_client = "pub-9426659565807829";google_ad_slot = "9359905831";google_ad_width = 728;google_ad_height = 15;//--></script><script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>2006-02-07T10:56:48Zlength.txt2005-11-08T10:35:42Z2005-11-08T10:35:42Z<br/>Surprisingly, String length more complicate than we excepted. A char is not necessarily a complete character, so if you need to know the character length, you need to use codePointCount method<br/><br/> int charLen = myString.length();<br/> int characterLen = myString.codePointCount(0, charLen);<br/><br/>However, if you use UTF-8 encoding, string.length() will work as expected.<br/><br/>More detail see:<br/><a href="http://forum.java.sun.com/thread.jspa?threadID=671720">http://forum.java.sun.com/thread.jspa?threadID=671720</a> <br/><br/><script type="text/javascript"><!--google_ad_client = "pub-9426659565807829";google_ad_slot = "9359905831";google_ad_width = 728;google_ad_height = 15;//--></script><script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>2005-11-08T10:35:42Z