V4 runtime: tune Runtime::add/sub/mul a bit.
authorErik Verbruggen <erik.verbruggen@digia.com>
Fri, 22 Aug 2014 10:29:20 +0000 (12:29 +0200)
committerErik Verbruggen <erik.verbruggen@digia.com>
Wed, 10 Sep 2014 13:52:24 +0000 (15:52 +0200)
commit36b365040a18653b3c522ea573a506b955b6c4da
tree09a2aac4ce9c246aeb7272fe59ee8ed0ed981678
parentdac6bad5ba411ccc4e6e5fe18250a912d7e87b9c
V4 runtime: tune Runtime::add/sub/mul a bit.

Tell the compiler to schedule the int32 case first, tune the double
conversion a bit (int64->double is quite expensive), and write the
function in such a way that it matches typical overflow idiom which
compilers recognize.

Change-Id: Ieae9a60275716002fbdbc54e1d7291c8aad8c927
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
src/qml/jsruntime/qv4math_p.h
src/qml/jsruntime/qv4runtime_p.h