416 ! ! |
416 ! ! |
417 |
417 |
418 !PPCBenchmark methodsFor:'setup & teardown-CalipeL'! |
418 !PPCBenchmark methodsFor:'setup & teardown-CalipeL'! |
419 |
419 |
420 setupJavaSyntaxC |
420 setupJavaSyntaxC |
421 |
421 |
422 parser := PPJavaSyntax new. |
422 ((Smalltalk respondsTo:#isSmalltalkX) and:[Smalltalk isSmalltalkX]) ifTrue:[ |
423 context := PPCContext new. |
423 BenchmarkSkipRequest signal. |
424 context initializeFor: parser. |
424 ]. |
425 input := sources javaSourcesBig. |
425 |
|
426 parser := PPJavaSyntax new. |
|
427 context := PPCContext new. |
|
428 context initializeFor: parser. |
|
429 input := sources javaSourcesBig. |
|
430 |
|
431 "Modified: / 20-04-2015 / 12:55:06 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
426 ! |
432 ! |
427 |
433 |
428 setupJavaSyntaxCompiledC |
434 setupJavaSyntaxCompiledC |
429 parser := PPJavaSyntax new compile. |
435 ((Smalltalk respondsTo:#isSmalltalkX) and:[Smalltalk isSmalltalkX]) ifTrue:[ |
430 context := PPCContext new. |
436 BenchmarkSkipRequest signal. |
431 context initializeFor: parser. |
437 ]. |
432 input := sources javaSourcesBig. |
438 parser := PPJavaSyntax new compile. |
433 |
439 context := PPCContext new. |
434 " |
440 context initializeFor: parser. |
435 size := input inject: 0 into: [:r :e | r + e size ]. |
441 input := sources javaSourcesBig. |
436 Transcript crShow: 'Compiled Grammar time: ', time asString. |
442 |
437 Transcript crShow: 'Time per character: ', (time / size * 1000.0) asString, ' microseconds'. |
443 " |
438 " |
444 size := input inject: 0 into: [:r :e | r + e size ]. |
|
445 Transcript crShow: 'Compiled Grammar time: ', time asString. |
|
446 Transcript crShow: 'Time per character: ', (time / size * 1000.0) asString, ' microseconds'. |
|
447 " |
|
448 |
|
449 "Modified: / 20-04-2015 / 12:55:29 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
439 ! |
450 ! |
440 |
451 |
441 setupRBParserC |
452 setupRBParserC |
442 |
453 |
443 input := sources smalltalkSourcesBig. |
454 input := sources smalltalkSourcesBig. |