1775
|
1 |
"{ Package: 'stx:libjava/benchmarks' }"
|
|
2 |
|
|
3 |
JavaBenchmark subclass:#WrappedArguments
|
|
4 |
instanceVariableNames:''
|
|
5 |
classVariableNames:''
|
|
6 |
poolDictionaries:''
|
|
7 |
category:'Benchmarks-Java-Micro'
|
|
8 |
!
|
|
9 |
|
|
10 |
|
|
11 |
!WrappedArguments methodsFor:'running'!
|
|
12 |
|
1776
|
13 |
doSmth_i: i
|
|
14 |
^self
|
|
15 |
|
|
16 |
!
|
|
17 |
|
1780
|
18 |
runBenchmarkS2J:n
|
1775
|
19 |
| inst |
|
|
20 |
|
1785
|
21 |
inst := JAVA stx libjava benchmarks WrappedArguments new.
|
1780
|
22 |
^ Time
|
|
23 |
millisecondsToRun:[
|
|
24 |
1 to:n do:[:idx |
|
|
25 |
inst doSmth:idx.
|
|
26 |
].
|
1775
|
27 |
].
|
|
28 |
|
1780
|
29 |
"Created: / 31-10-2012 / 23:37:24 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
1776
|
30 |
!
|
|
31 |
|
|
32 |
runBenchmarkS: n
|
|
33 |
| inst |
|
|
34 |
inst := self class new.
|
|
35 |
|
|
36 |
^ Time millisecondsToRun: [
|
|
37 |
1 to: n do:[:idx|
|
|
38 |
inst doSmth_i: idx.
|
|
39 |
].
|
|
40 |
].
|
|
41 |
|
|
42 |
"Created: / 31-10-2012 / 22:59:56 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
1775
|
43 |
! !
|
|
44 |
|
|
45 |
!WrappedArguments class methodsFor:'documentation'!
|
|
46 |
|
|
47 |
version_SVN
|
|
48 |
^ '$Id:: $'
|
|
49 |
! !
|