A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2011-January/107791.html below:

[Python-Dev] short fetch for NEXTARG macro (was: one byte byte code arguments)

[Python-Dev] short fetch for NEXTARG macro (was: one byte byte code arguments) [Python-Dev] short fetch for NEXTARG macro (was: one byte byte code arguments)Jurjen N.E. Bos Jurjen.Bos at hetnet.nl
Mon Jan 31 13:28:39 CET 2011
I just did it: my first python source code hack.
I replaced the NEXTARG and PEEKARG macros in ceval.c using a cast to  
short pointer, and lo and behold, a crude measurement indicates one  
to two percent speed increase.
That isn't much, but it is virtually for free!

Here are the macro's I used:
#define NEXTARG() (next_instr +=2, *(short*)&next_instr[-2])
#define PEEKARG() (*(short*)&next_instr[1])

- Jurjen
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4