Open andrewlow opened 11 years ago
Initial implementation doesn't appear to produce much difference in terms of performance
baseline:
$ ../out/ppc.release/d8 run.js
Richards: 6704
DeltaBlue: 8562
Crypto: 5987
RayTrace: 8189
EarleyBoyer: 16069
RegExp: 2383
Splay: 4603
NavierStokes: 7842
----
Score (version 7): 6664
-bash-4.1$ ../out/ppc.release/d8 run.js
Richards: 6683
DeltaBlue: 7121
Crypto: 5976
RayTrace: 8132
EarleyBoyer: 15795
RegExp: 2392
Splay: 4480
NavierStokes: 7749
----
Score (version 7): 6460
-bash-4.1$ ../out/ppc.release/d8 run.js
Richards: 6704
DeltaBlue: 8549
Crypto: 6210
RayTrace: 8189
EarleyBoyer: 16052
RegExp: 2432
Splay: 4477
NavierStokes: 6997
----
Score (version 7): 6592
With new mov()
$ ../out/ppc.release/d8 run.js
Richards: 6390
DeltaBlue: 8556
Crypto: 5915
RayTrace: 8066
EarleyBoyer: 16049
RegExp: 2409
Splay: 4689
NavierStokes: 8358
----
Score (version 7): 6677
-bash-4.1$ ../out/ppc.release/d8 run.js
Richards: 6651
DeltaBlue: 8549
Crypto: 5921
RayTrace: 8067
EarleyBoyer: 16049
RegExp: 2404
Splay: 4702
NavierStokes: 7998
----
Score (version 7): 6675
-bash-4.1$ ../out/ppc.release/d8 run.js
Richards: 5627
DeltaBlue: 8483
Crypto: 6194
RayTrace: 8149
EarleyBoyer: 16091
RegExp: 2400
Splay: 4726
NavierStokes: 7709
----
Score (version 7): 6550
Commit a4e0fda83cf6748c2342d1daf297a5f73700036f - I'm not sure we can optimize more with mov()
Leaving this open until 64bit has been optimized - my commit above only addresses 32bit
The current mov() implementation in 32bit looks something like this
on 64bit it is 5 instructions
For some constants (specifically those that do not need relocation) we can do better.