W dniu 2012-11-17 23:03, Daniel Naber pisze: > On 17.11.2012, 17:17:56 Marcin Miłkowski wrote: > >> Do you have stats per call of the method? It may be more informative. > > See attached file, is that what you mean? It's after checking three or so > German documents.
This is what I mean. The method isStringTokenMatched() is quite optimized but we might try something more. (1) The difference between equalsIgnoreCase() and equals() depends on the data. Actually, for German, you might be using the latter one more frequently than in other languages. It might be interesting to see two modifications: (a) replace equals() with equalsIgnoreCase() (b) replace equalsIgnoreCase() with equals() This might give some hint whether we have some space for improvement here. (2) instead of using String.equals(), we might first check the hashcode: public static boolean equals(final String s1, final String s2) { return s1 != null && s2 != null && s1.hashCode() == s2.hashCode() && s1.equals(s2); } This was reported to be much faster. So let's see whether this changes anything. Regards, Marcin ------------------------------------------------------------------------------ Monitor your physical, virtual and cloud infrastructure from a single web console. Get in-depth insight into apps, servers, databases, vmware, SAP, cloud infrastructure, etc. Download 30-day Free Trial. Pricing starts from $795 for 25 servers or applications! http://p.sf.net/sfu/zoho_dev2dev_nov _______________________________________________ Languagetool-devel mailing list Languagetool-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/languagetool-devel