codlili is not a truly random-access type and gives the false impression that elements can be accessed in constant time with this operator (they can't, we have to walk up the list, it's O(n)).
I've scanned the source of arby and all our access of the digits stored as codlili indicates we're either:
accessing front and back
iterating forwards trivially
iterating backwards
iterating but also using the index number in calculations whilst doing so
Once reverse iterators are implemented in #56, iterating backwards becomes trivial.
All of these except the last point can be addressed with minimal modifications to Arby, the last one will require slightly more work though, as we'll need to maintain both an iterator and index count separately in these loops.
Note: this is an important fix for efficiency, in some places we use [] to iterate backwards in a for-loop --the hidden actual complexity of this loop becomes n! as a result!
codlili is not a truly random-access type and gives the false impression that elements can be accessed in constant time with this operator (they can't, we have to walk up the list, it's O(n)).
I've scanned the source of arby and all our access of the digits stored as codlili indicates we're either:
Once reverse iterators are implemented in #56, iterating backwards becomes trivial. All of these except the last point can be addressed with minimal modifications to Arby, the last one will require slightly more work though, as we'll need to maintain both an iterator and index count separately in these loops.
Note: this is an important fix for efficiency, in some places we use [] to iterate backwards in a for-loop --the hidden actual complexity of this loop becomes n! as a result!