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

2011-01-31 Thread James Y Knight
On Jan 31, 2011, at 7:45 AM, Antoine Pitrou wrote: > On Mon, 31 Jan 2011 13:28:39 +0100 > "Jurjen N.E. Bos" wrote: >> 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 measuremen

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

2011-01-31 Thread Cesare Di Mauro
2011/1/31 Antoine Pitrou > On Mon, 31 Jan 2011 13:28:39 +0100 > "Jurjen N.E. Bos" wrote: > > 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 tw

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

2011-01-31 Thread Antoine Pitrou
On Mon, 31 Jan 2011 13:28:39 +0100 "Jurjen N.E. Bos" wrote: > 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 is

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

2011-01-31 Thread Jurjen N.E. Bos
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: