[kaffe] split function (String): slow implementation
Gianluca Moro
giangiammy at yahoo.com
Tue Nov 22 00:00:21 PST 2005
Hi all,
I tested the following program, where I use
the split functin.
the 1st call to split needs 7/8 seconds to be accomplished, while
all the following calls are quickly done.
(kaffe-1.1.6 compiles on a MIPS platgorm - AMD au1100, 400MHz)
It seems that kaffe need to to something (parser initialization?)
very time consuming: is it a normal behaviour, or should not
happen this?
thanks
giammy
public class Spl {
public Spl() {
String s = "Marameo|va|che|beo";
String s2 = "Marameo2|va2|che2|beo2";
String [] subs = null;
System.out.println("INIZIO");
subs = s.split("\\|");
System.out.println("OK " + subs[1]);
System.out.println("INIZIO");
subs = s2.split("\\|");
System.out.println("OK " + subs[1]);
}
public static void main(String[] args) {
Spl spl = new Spl();
}
}
--
Gianluca Moro http://groups.yahoo.com/group/embeddeditalia/
ISCRIVITI alla Mailing List Italiana su LINUX EMBEDDED
giangiammy at yahoo.com Visit http://ilpinguino.altervista.org/
___________________________________
Yahoo! Mail: gratis 1GB per i messaggi e allegati da 10MB
http://mail.yahoo.it
More information about the kaffe
mailing list