GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — Specialize long tail of binary operations using a table. · Issue #100239 · python/cpython Open Labels interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)performancePerformance or resource usagePerformance or resource usagetype-featureA feature request or enhancementA feature request or enhancement DescriptionThere is a desire to specialize the remaining binary operations (including binary subscript). This idea is to have a lookup table of types pairs and function pointers. This is less efficient than inlining the code, but more extensible. A single instruction can then support up to 256 specializations. struct table_entry { PyTypeObject *left; PyTypeObject *left; binaryfunc *func; }; TARGET(BINARY_OP_TABLE) { PyObject *lhs = SECOND(); PyObject *rhs = TOP(); Cache *cache = GET_CACHE(); struct table_entry* entry = &THE_TABLE[cache->table_index]; DEOPT_IF(Py_TYPE(lhs) != entry->left); DEOPT_IF(Py_TYPE(rhs) != entry->right); PyObject *res = entry->func(lhs, rhs); if (res == NULL) { goto error; } STACK_SHRINK(1); Py_DECREF(lhs); Py_DECREF(rhs); SET_TOP(res); DISPATCH(); } An ancillary mapping of It is probably worth keeping the most common operations We can replace Registering binary functions at runtimeLinked PRs
Reacted by zhuofeng, Brandt Bucher, Dennis Sweeney, Donghee Na, Alexandr Artemyev and Wulian233 Activity
MetadataMetadataAssigneesLabelsinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)performancePerformance or resource usagePerformance or resource usagetype-featureA feature request or enhancementA feature request or enhancement ProjectsMilestoneRelationshipsDevelopmentIssue actions |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |