www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 17736] New: bigint opunary should be better performing

https://issues.dlang.org/show_bug.cgi?id=17736

          Issue ID: 17736
           Summary: bigint opunary should be better performing
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: phobos
          Assignee: nobody puremagic.com
          Reporter: schveiguy yahoo.com

Currently, opUnary!"++" maps to 
this = this + 1

However, this is going to allocate a whole new temporary structure and then
throw it away. opUnary ++ and -- should edit the bigint in place.

Same goes for opOpAssign, those could be improved, but this issue is for the
low hanging fruit, as incrementing is easy.

--
Aug 09