forked from jasder/antlr
add my results to Ben's, small cleanup.
This commit is contained in:
parent
5a93f099a3
commit
9cf26d0163
|
@ -40,6 +40,32 @@ Warming up Java compiler....
|
|||
lex_legacy_grapheme_utf8 average time 10040us over 400 runs of 13379 symbols from udhr_hin.txt
|
||||
lex_legacy_grapheme_utf8 average time 10221us over 400 runs of 13379 symbols from udhr_hin.txt DFA cleared
|
||||
*
|
||||
* Sample output on OS X with 4 GHz Intel Core i7 (us == microseconds, 1/1000 of a millisecond):
|
||||
*
|
||||
Java VM args: -Xms2G -Xmx2G
|
||||
Warming up Java compiler....
|
||||
load_legacy_java_ascii average time 45us size 54301b over 3500 loads of 29038 symbols from Parser.java
|
||||
load_legacy_java_utf8 average time 44us size 60072b over 3500 loads of 29038 symbols from Parser.java
|
||||
load_legacy_java_utf8 average time 129us size 23110b over 3500 loads of 13379 symbols from udhr_hin.txt
|
||||
load_new_utf8 average time 184us size 190579b over 3500 loads of 29038 symbols from Parser.java
|
||||
load_new_utf8 average time 196us size 57482b over 3500 loads of 13379 symbols from udhr_hin.txt
|
||||
|
||||
lex_legacy_java_utf8 average time 388us over 2000 runs of 29038 symbols
|
||||
lex_legacy_java_utf8 average time 922us over 2000 runs of 29038 symbols DFA cleared
|
||||
lex_new_java_utf8 average time 452us over 2000 runs of 29038 symbols
|
||||
lex_new_java_utf8 average time 977us over 2000 runs of 29038 symbols DFA cleared
|
||||
|
||||
lex_legacy_grapheme_utf8 average time 6802us over 400 runs of 6614 symbols from udhr_kor.txt
|
||||
lex_legacy_grapheme_utf8 average time 6950us over 400 runs of 6614 symbols from udhr_kor.txt DFA cleared
|
||||
lex_legacy_grapheme_utf8 average time 6233us over 400 runs of 13379 symbols from udhr_hin.txt
|
||||
lex_legacy_grapheme_utf8 average time 6172us over 400 runs of 13379 symbols from udhr_hin.txt DFA cleared
|
||||
lex_new_grapheme_utf8 average time 6962us over 400 runs of 6614 symbols from udhr_kor.txt
|
||||
lex_new_grapheme_utf8 average time 7045us over 400 runs of 6614 symbols from udhr_kor.txt DFA cleared
|
||||
lex_new_grapheme_utf8 average time 6161us over 400 runs of 13379 symbols from udhr_hin.txt
|
||||
lex_new_grapheme_utf8 average time 6217us over 400 runs of 13379 symbols from udhr_hin.txt DFA cleared
|
||||
lex_new_grapheme_utf8 average time 108us over 400 runs of 85 symbols from emoji.txt
|
||||
lex_new_grapheme_utf8 average time 109us over 400 runs of 85 symbols from emoji.txt DFA cleared
|
||||
*
|
||||
* The "DFA cleared" indicates that the lexer was returned to initial conditions
|
||||
* before the tokenizing of each file. As the ALL(*) lexer encounters new input,
|
||||
* it records how it tokenized the chars. The next time it sees that input,
|
||||
|
@ -132,7 +158,9 @@ public class TimeLexerSpeed { // don't call it Test else it'll run during "mvn t
|
|||
long beforeFreeMem = Runtime.getRuntime().freeMemory();
|
||||
long start = System.nanoTime(); // track only time to suck data out of stream
|
||||
for (int i = 0; i<n; i++) {
|
||||
input[i] = new ANTLRInputStream(streams[i]);
|
||||
try (InputStream is = streams[i]) {
|
||||
input[i] = new ANTLRInputStream(is);
|
||||
}
|
||||
}
|
||||
long stop = System.nanoTime();
|
||||
long tus = (stop-start)/1000;
|
||||
|
|
Loading…
Reference in New Issue