diff Python/ceval.c @ 24900:2cdf3d0dfabd legacy-trunk

Add a warning comment to the LOAD_GLOBAL inline code.
author Guido van Rossum <guido@python.org>
date Mon, 19 Aug 2002 21:17:53 +0000
parents 8f8fe990e82c
children 01e1d6abc501
line wrap: on
line diff
--- a/Python/ceval.c	Mon Aug 19 20:24:07 2002 +0000
+++ b/Python/ceval.c	Mon Aug 19 21:17:53 2002 +0000
@@ -1710,9 +1710,11 @@
 		case LOAD_GLOBAL:
 			w = GETITEM(names, oparg);
 			if (PyString_CheckExact(w)) {
+				/* Inline the PyDict_GetItem() calls.
+				   WARNING: this is an extreme speed hack.
+				   Do not try this at home. */
 				long hash = ((PyStringObject *)w)->ob_shash;
 				if (hash != -1) {
-					/* Inline the PyDict_GetItem() calls */
 					PyDictObject *d;
 					d = (PyDictObject *)(f->f_globals);
 					x = d->ma_lookup(d, w, hash)->me_value;