DMD generates slow code in simple situations such as: double foo(double x) { return x*2; } It creates a floating-point constant 2.0, and then generates an FMUL to multiply by it. It's particularly slow in the 80-bit real case, where two instructions (FLD and FMULP) are required. The attached patch generates the fast and simple FADD ST(0), ST; instead. It only applies to float,double, real, not to complex numbers.
Created attachment 338 [details] Patch against DMD2.029 This will be a useful step towards further optimisation of pure functions with real return values.
Renaming this issue to be less negative
Fixed dmd 1.046 and 2.031
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル