Github user kiszk commented on the issue:
https://github.com/apache/spark/pull/19518
I created and ran another synthetic benchmark program for comparing flat
global variables, inner global variables, and array using janinoc for target
Java file.
The performance is not much different from the previous one. In summary,
the followings are performance results (**small number is better**).
- 1: array
- 0.90: inner global variables
- 0.81: flat global variables
WDYT? Any comments are very appreciated.
Here are
[Test.java](https://gist.github.com/kiszk/63c2829488cb777d7ca78d45d20c021f) and
[myInsntance.py](https://gist.github.com/kiszk/049a62f5d1259481c400a86299bd0228)
that I used.
```
$ cat /proc/cpuinfo | grep "model name" | uniq
model name : Intel(R) Xeon(R) CPU E5-2667 v3 @ 3.20GHz
$ java -version
openjdk version "1.8.0_131"
OpenJDK Runtime Environment (build 1.8.0_131-8u131-b11-2ubuntu1.16.04.3-b11)
OpenJDK 64-Bit Server VM (build 25.131-b11, mixed mode)
$ python myInstance.py > MyInstance.java && janinoc MyInstance.java &&
javac Test.java && java -Xmx16g Test
Result(us): Array
0: 484251.446
1: 483374.255
2: 483956.692
3: 482498.241
4: 483602.261
5: 482654.567
6: 482896.671
7: 483458.625
8: 483194.317
9: 483387.234
10: 484103.729
11: 483536.493
12: 483790.828
13: 483590.991
14: 483993.488
15: 483455.164
16: 484040.009
17: 483225.837
18: 483126.520
19: 484105.989
20: 484988.935
21: 483766.245
22: 483667.930
23: 483271.499
24: 483071.606
25: 483174.438
26: 483602.474
27: 483210.405
28: 483907.061
29: 483071.964
BEST: 482498.241000, AVG: 483532.530
Result(us): InnerVars
0: 437016.533
1: 436125.481
2: 436360.534
3: 435857.758
4: 436166.243
5: 437089.913
6: 436168.359
7: 435570.397
8: 435550.848
9: 435256.088
10: 435252.679
11: 435765.156
12: 435646.739
13: 437303.993
14: 435315.530
15: 435752.545
16: 434857.606
17: 436776.190
18: 435444.877
19: 435657.649
20: 436248.147
21: 436322.998
22: 437214.262
23: 435907.223
23: 435907.223
24: 435431.025
25: 435274.317
26: 435412.202
27: 435670.321
28: 436494.045
29: 436347.838
BEST: 434857.606, AVG: 435975.250
Result(us): Vars
0: 353983.048
1: 354067.690
2: 353138.178
3: 354093.115
4: 354067.180
5: 352750.571
6: 353672.510
7: 355179.115
8: 353296.750
9: 354522.113
10: 355221.301
11: 355178.172
12: 353859.319
13: 353539.817
14: 352703.352
15: 353923.981
16: 354442.744
17: 355523.145
18: 354849.122
19: 354082.888
20: 354673.504
21: 355526.218
22: 355264.029
23: 355455.492
24: 355520.322
25: 353923.520
26: 353796.600
27: 355021.849
28: 355800.387
29: 353810.567
BEST: 352703.352, AVG: 354362.887
```
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]