[Stackless-checkins] CVS: slpdev/src/2.3/dev/Stackless/core extract_slp_methods.py, 1.2, 1.3 stackless_methods.h, 1.4, 1.5
Christian Tismer
tismer at centera.de
Mon Jul 12 20:56:58 CEST 2004
Update of /home/cvs/slpdev/src/2.3/dev/Stackless/core
In directory centera.de:/tmp/cvs-serv18053/Stackless/core
Modified Files:
extract_slp_methods.py stackless_methods.h
Log Message:
A tiny optimization of oparg fetching for X86.
Mainly I started optimizing by keeping interpreters on the stack.
This is just a cache-like optimization and gives a few percent.
But I think it will really count for generator/iterator situations.
Index: extract_slp_methods.py
===================================================================
RCS file: /home/cvs/slpdev/src/2.3/dev/Stackless/core/extract_slp_methods.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** extract_slp_methods.py 10 Jul 2004 00:54:22 -0000 1.2
--- extract_slp_methods.py 12 Jul 2004 18:56:55 -0000 1.3
***************
*** 52,56 ****
#define MFLAG_OFS(meth) offsetof(PyTypeObject, slpflags.meth)
#define MFLAG_OFS_IND(meth) MFLAG_OFS(meth) + MFLAG_IND
!
static _stackless_method _stackless_methtable[] = {\
"""
--- 52,56 ----
#define MFLAG_OFS(meth) offsetof(PyTypeObject, slpflags.meth)
#define MFLAG_OFS_IND(meth) MFLAG_OFS(meth) + MFLAG_IND
!
static _stackless_method _stackless_methtable[] = {\
"""
***************
*** 69,75 ****
lng += 8
ind = ""
! if typ[0] != "&":
! typ = "&" + typ
ind = "_IND"
print >> f, "\t{%s,%sMFLAG_OFS%s(%s)}," % \
(typ, tabs, ind, meth)
--- 69,76 ----
lng += 8
ind = ""
! if not typ.startswith("&"):
! # indirection flag
ind = "_IND"
+ typ = "&" + typ
print >> f, "\t{%s,%sMFLAG_OFS%s(%s)}," % \
(typ, tabs, ind, meth)
Index: stackless_methods.h
===================================================================
RCS file: /home/cvs/slpdev/src/2.3/dev/Stackless/core/stackless_methods.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** stackless_methods.h 10 Jul 2004 00:54:22 -0000 1.4
--- stackless_methods.h 12 Jul 2004 18:56:55 -0000 1.5
***************
*** 13,17 ****
#define MFLAG_OFS(meth) offsetof(PyTypeObject, slpflags.meth)
#define MFLAG_OFS_IND(meth) MFLAG_OFS(meth) + MFLAG_IND
!
static _stackless_method _stackless_methtable[] = {
/* from classobject.c */
--- 13,17 ----
#define MFLAG_OFS(meth) offsetof(PyTypeObject, slpflags.meth)
#define MFLAG_OFS_IND(meth) MFLAG_OFS(meth) + MFLAG_IND
!
static _stackless_method _stackless_methtable[] = {
/* from classobject.c */
_______________________________________________
Stackless-checkins mailing list
Stackless-checkins at stackless.com
http://www.stackless.com/mailman/listinfo/stackless-checkins
More information about the Stackless-checkins
mailing list