compiler/benchmarks/PPCBenchmark.st
changeset 525 751532c8f3db
parent 520 9ccc84deaea0
parent 524 f6f68d32de73
child 529 439c4057517f
equal deleted inserted replaced
523:09afcf28ed60 525:751532c8f3db
   257 ! !
   257 ! !
   258 
   258 
   259 !PPCBenchmark methodsFor:'benchmarks - smalltalk'!
   259 !PPCBenchmark methodsFor:'benchmarks - smalltalk'!
   260 
   260 
   261 benchmarkOpalCompiler
   261 benchmarkOpalCompiler
   262     | parser time input |
   262     | time  |
   263     parser := OpalCompiler new.
   263     parser := OpalCompiler new.
   264     input := sources smalltalkSourcesBig.
   264     input := sources smalltalkSourcesBig.
   265     time := [ input do: [ :source | parser parse: source ]] timeToRun asMilliseconds.
   265     time := [ input do: [ :source | parser parse: source ]] timeToRun asMilliseconds.
   266     
   266     
   267     self reportInput: input time: time name: 'Opal'
   267     self reportInput: input time: time name: 'Opal'
   664 !
   664 !
   665 
   665 
   666 setupSmalltalkGrammarCompiled
   666 setupSmalltalkGrammarCompiled
   667 
   667 
   668     configuration := PPCConfiguration universal.
   668     configuration := PPCConfiguration universal.
   669     configuration arguments parserName: #PPCompiledSmalltalkGrammar.
   669     configuration arguments parserName: #PPSmalltalkGrammarC_Unviersal.
   670     configuration arguments scannerName: #PPCompiledSmalltalkScanner.
       
   671     configuration arguments profile: profile.
   670     configuration arguments profile: profile.
   672     
   671     
   673     parser := PPSmalltalkGrammar new compileWithConfiguration: configuration.
   672     parser := PPSmalltalkGrammar new compileWithConfiguration: configuration.
   674     context := self context.
   673     context := self context.
   675     context initializeFor: parser.
   674     context initializeFor: parser.
   682 !
   681 !
   683 
   682 
   684 setupSmalltalkGrammarTokenized
   683 setupSmalltalkGrammarTokenized
   685 
   684 
   686     configuration := PPCConfiguration tokenizing.
   685     configuration := PPCConfiguration tokenizing.
   687     configuration arguments parserName: #PPTokenizedSmalltalkGrammar.
   686     configuration arguments parserName: #PPSmalltalkGrammarC_Tokenizing.
   688     configuration arguments scannerName: #PPTokenizedSmalltalkScanner.
   687     configuration arguments scannerName: #PPSmalltalkGrammarC_Scanner.
   689     configuration arguments profile: profile.
   688     configuration arguments profile: profile.
   690     
   689     
   691     parser := PPSmalltalkGrammar new compileWithConfiguration: configuration.
   690     parser := PPSmalltalkGrammar new compileWithConfiguration: configuration.
   692     context := self context.
   691     context := self context.
   693     context initializeFor: parser.
   692     context initializeFor: parser.