On Thu, 14 Sep 2017 17:47:59 -0700, alex.jakime...@gmail.com wrote: > but I guess it is possible to store the index of the current enum value and > simply increment/decrement it when needed.
That's trading more RAM for performance increase that's likely inconsequential in nearly all use cases. To hit any performance bottleneck you'd both have to be iterating over enums and have an Enumeration with a couple thousand values, but you'd be paying with extra memory in exactly all use cases. Premature optimization is the root of all evil. ---- The bug mentioned later in the ticket is in Enumeration.WHICH that uses the value's + Enumeration's name, discarding the instance name. The nqp::eqaddr works as a workaround: https://github.com/rakudo/rakudo/pull/1156#issuecomment-329743684