Bug 17662 – Replace 2.0^e2 with std.math.ldexp(1.0, cast(int) e2)

Status
NEW
Severity
enhancement
Priority
P4
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2017-07-18T01:38:24Z
Last change time
2024-12-13T18:53:28Z
Keywords
performance
Assigned to
No Owner
Creator
Seb
Moved to GitHub: dmd#19285 →

Comments

Comment #0 by greensunny12 — 2017-07-18T01:38:24Z
See also: https://github.com/dlang/phobos/pull/5057 > It should be clear that just setting the exponent (some integer ops) is way faster than the current loop for bigger absolute N, but I didn't perform any speed tests. I'd rather drop this and add the optimization to the compiler, something like [1] [1] https://github.com/kinke/ldc/commit/dc01a338d73c2cdb843de6426f520f6c175640d3
Comment #1 by robert.schadek — 2024-12-13T18:53:28Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/19285 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB