Message157612
What compiler are you using? With gcc 4.4 on 32-bit Linux netbook I get:
unpatched union shift
utf-16le " "*10000 129 126 109
utf-16le "\u263A"*10000 208 203 160
utf-16be " "*10000 153 147 114
utf-16be "\u263A"*10000 226 227 167
The difference is that for shift the compiler stores block in register, and for the union the compiler stores block in memory, so that it can get address. May be more recent compilers learned to do this more effectively?
Besides, shifts are more pronounced for CPython code, searching shows very few uses of union in the source code. |
|
Date |
User |
Action |
Args |
2012-04-05 19:46:23 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, pitrou, vstinner, benjamin.peterson, skrah, python-dev |
2012-04-05 19:46:23 | serhiy.storchaka | set | messageid: <1333655183.56.0.678322448275.issue14249@psf.upfronthosting.co.za> |
2012-04-05 19:46:23 | serhiy.storchaka | link | issue14249 messages |
2012-04-05 19:46:22 | serhiy.storchaka | create | |
|