diff options
author | Guido van Rossum <guido@python.org> | 2002-08-19 21:17:53 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2002-08-19 21:17:53 (GMT) |
commit | d8dbf847b6a819ef73d7bf0c05eafbdb9aee9956 (patch) | |
tree | 5eb1c8115289415b9bc5e6acccd52d78f262ad34 /Python/ceval.c | |
parent | 3a4dfc87e68c8158110145df12109b155eea16e4 (diff) | |
download | cpython-d8dbf847b6a819ef73d7bf0c05eafbdb9aee9956.zip cpython-d8dbf847b6a819ef73d7bf0c05eafbdb9aee9956.tar.gz cpython-d8dbf847b6a819ef73d7bf0c05eafbdb9aee9956.tar.bz2 |
Add a warning comment to the LOAD_GLOBAL inline code.
Diffstat (limited to 'Python/ceval.c')
-rw-r--r-- | Python/ceval.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Python/ceval.c b/Python/ceval.c index af9c072..00237c0 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -1710,9 +1710,11 @@ eval_frame(PyFrameObject *f) 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; |