Open
Bug 605933
Opened 14 years ago
Updated 8 months ago
IonMonkey: Division by Constant Double
Categories
(Core :: JavaScript Engine, enhancement)
Tracking
()
NEW
People
(Reporter: evilpie, Unassigned)
References
(Blocks 1 open bug)
Details
(Whiteboard: [ion:t])
After Division by Constant for NanoJit didnt work out yet, i tried out my approach for double division. Double division can be rewritten to 2x multiplications and 1x add, if the divisor is in some parameters. See http://hal.inria.fr/docs/00/08/74/65/PDF/DivIEEETC-aug04.pdf and http://lara.inist.fr/bitstream/2332/801/1/LIP-RR2002-30.pdf. I didn't implement the check yet, but did try out rewriting the expression. a = 2; b = 3.2; for (i = 0; i <= 1000000; i++) { c = a / b; } This goes down from about 13~15 to about ~5, without losing precision. Pastebin of approach: http://pastebin.mozilla.org/822613
Comment 1•14 years ago
|
||
Interesting. I wonder how frequently this happens in real code.
Reporter | ||
Comment 2•14 years ago
|
||
I went through the benchmark, but there seems to be no! use of division by constant with double. I will try to check modulo next, this should bring definite win!
Comment 3•14 years ago
|
||
Is this a dup of bug 600459?
Comment 4•13 years ago
|
||
Is this bug useful for JM too?
Reporter | ||
Comment 5•13 years ago
|
||
Maybe it's useful for IM, not sure yet.
Summary: TM: Division by Constant Double → IonMonkey: Division by Constant Double
Updated•12 years ago
|
Whiteboard: [ion:t]
Assignee | ||
Updated•10 years ago
|
Assignee: general → nobody
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•