D-Programming-Language/phobos — pull request #732 by blackwhale (2012-07-31 20:39:00+00:00)
Title: Tweak std.variant arithmetic to use tag dispatch

This avoids a ton of typeid and extra call related code.
As discussed on NG it turns out to be no less then an order of magnitude faster.
http://forum.dlang.org/post/jv466a$1ent$1@digitalmars.com

For now I tested fib.d without -O flag just so that compiler doesn't cheat for int/long version,
gains may be greater with -O enabled.

It does pass unit tests for me but I'm still not sure I did the right thing for the other branch of opArithmetic.