Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
[Optimization] avoid copying for intersectInPlace() #419
changed the title from
Set: avoid copy during intersectInPlace
[Optimization] avoid copy during intersectInPlace
Dec 11, 2015
@dduan Thank you for the patch. I support this change, but we need some changes to make sure we keep the code testable and tested.
Please take a look at this comment in the file:
Your change needs to move the method to a different category, and expand tests for this method to be more extensive (that is, to test with both native and bridged sets).
@dduan At the moment there is no good way to test the performance of your patch. Can you write a small benchmark program and test the performance before/after? Adding code to the standard library has a cost (in terms of readability and compile time) and we need to have at least on example that shows a performance win.