Bug 4538 – Listed complexity of reverse() is incorrect
Status
RESOLVED
Resolution
FIXED
Severity
trivial
Priority
P2
Component
dlang.org
Product
D
Version
D2
Platform
All
OS
All
Creation time
2010-07-30T19:10:00Z
Last change time
2012-02-05T16:30:26Z
Keywords
pull
Assigned to
andrei
Creator
Justin.SpahrSummers
Comments
Comment #0 by Justin.SpahrSummers — 2010-07-30T19:10:10Z
Really minor issue, but I noticed that the complexity of reverse() -- in terms of calls to swap() -- is incorrect in the Phobos2 documentation. It states:
Reverses r in-place. Performs r.length evaluations of swap.
when reversal should actually only perform, and assumably does perform, r.length / 2 evaluations of swap().