Message263702
When star unpacking positions into a function we can avoid a copy iff there are no extra arguments coming from the stack. Syntactically this looks like: `f(*args)` This reduces the overhead of the call by about 25% (~30ns on my machine) based on some light profiling of just * unpacking. I can imagine this having a slight impact on code that uses this feature in a loop. The cost is minimal when we need to make the copy because the int != 0 check is dwarfed by the allocation. I did not notice a significant change between the slow path and the original code. The macro benchmark suite did not show a difference on my machine but this is not much more complex code. | |
Date | User | Action | Args | 2016-04-19 01:10:12 | llllllllll | set | recipients: + llllllllll | 2016-04-19 01:10:12 | llllllllll | set | messageid: <1461028212.35.0.591299573852.issue26802@psf.upfronthosting.co.za> | 2016-04-19 01:10:12 | llllllllll | link | issue26802 messages | 2016-04-19 01:10:11 | llllllllll | create | | |