Closed GoogleCodeExporter closed 8 years ago
Link to the revision to review:
http://code.google.com/p/vt-middleware/source/detail?r=1832
Original comment by dfis...@gmail.com
on 18 Feb 2011 at 4:16
Attached patch with alternative implementation that makes heavy use of
iterators to do the minimal amount of character comparison and make the most of
code reuse in abstract base class.
Original comment by marvin.addison@gmail.com
on 22 Feb 2011 at 4:38
Attachments:
I wrote a unit test to confirm performance.
Validating 1000 passwords with all sequence rules in the rule list:
Current impl: ~40ms
Patch impl: ~110ms
Not particularly surprising since the current impl definitely trades memory for
performance.
Those numbers aside, I think the patch has something to offer.
I'll continue my review...
Original comment by dfis...@gmail.com
on 22 Feb 2011 at 8:45
Attached patch that is along same lines of previous but with some
considerations for performance and clarity. Using the PerformanceTest in the
test source, this implementation is a mere 10% slower than the original with
precomputed static strings (with all flags set to true). This seems like a
clear winner in the speed/space tradeoff.
Original comment by marvin.addison@gmail.com
on 23 Feb 2011 at 7:34
Attachments:
Original comment by dfis...@gmail.com
on 25 Feb 2011 at 8:35
Original issue reported on code.google.com by
dfis...@gmail.com
on 18 Feb 2011 at 3:50