Closed MarshalX closed 8 months ago
I guess PyList::new
didn't work for you because the iteration produces fallible elements? I wonder if we can work to improve that...
@davidhewitt here is the flamegraph of append
before this PR:
is list resizing is fast in python btw? i mean resizing (with append) vs not resizing (with SET_ITEM)
I think resizing will always be slow, so it makes sense that this was a bottleneck. I will try to use this example to add weight to my suggestions for the CPython team ๐
CodSpeed Performance Report
Merging #40 will degrade performances by 12.26%
Comparing
optimize-array-creation
(6d428c8) withmain
(9fb1353)Summary
โก 1
improvementsโ 1 (๐ 1)
regressionsโ 190
untouched benchmarksBenchmarks breakdown
main
optimize-array-creation
test_dag_cbor_decode_fixtures[dagpb_simple_forms_3]
test_dag_cbor_decode_real_data[canada.json]