Message281448
Hum, sorry, my opinion on const is not obvious in my previous message: I like const :-) I want to use const everywhere! I still "believe" (I don't know if it's true or not) that const helps a lot compilers to optimize the code.
I don't know if it helps for a single variable. Maybe it's more helpful on a whole structure and/or pointers to avoid complex heuristics on aliasing.
My first attempt to design the _PyBytesWriter API was a big mistake: it was much slower: issue #17742. I understood that using a structure instead of multiple variables does stress the compiler who doesn't know if some optimizations are still save. In case of doubt, the compiler doesn't optimize to avoid generating invalid code. |
|
Date |
User |
Action |
Args |
2016-11-22 09:04:14 | vstinner | set | recipients:
+ vstinner, ncoghlan, martin.panter, serhiy.storchaka |
2016-11-22 09:04:14 | vstinner | set | messageid: <1479805454.14.0.346654880765.issue28769@psf.upfronthosting.co.za> |
2016-11-22 09:04:14 | vstinner | link | issue28769 messages |
2016-11-22 09:04:13 | vstinner | create | |
|