java.util.regex

OneGuy oneguyks@gmail.com
Thu May 8 09:31:00 GMT 2008


On Thu, May 8, 2008 at 4:22 AM, Andrew Haley <aph@redhat.com> wrote:

> That may be so.  On the other hand, perhaps Sun's JIT has discovered
> a smart optimization that isn't visible to gcc.  Profililng the
> program may show what is happenining.

Even a much serious problem is with java.util.regex  .. specifically,
this method

http://java.sun.com/j2se/1.4.2/docs/api/java/util/regex/Pattern.html

static Pattern compile(String regex)

The String I tested (very large string), java6 could execute the
method in few seconds. GCJ took more than one minute. It was more than
40 times slower.



More information about the Java mailing list