CozySynthesizer/cozy

[codegen] unnecessary vector resize and vector copy

izgzhen opened this issue · 3 comments

details will be refined later

def visit_SEnsureCapacity(self, s):

This resize will be emitted no matter whether the new size is same as the old size. I observed its impact to performance in one of our internal example.

https://github.com/CozySynthesizer/cozy/blob/master/cozy/structures/heaps.py: extra copying of vector is probably here, I will add more later when I bumped into it again.

A separating benchmarking (citation missing here, but .... anyway). so 1 WONT-FIX.
Need example for 2, WONT-FIX until I can write it down crystal-clear.