A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2003-February/033796.html below:

[Python-Dev] Re: new bytecode results

[Python-Dev] Re: new bytecode results [Python-Dev] Re: new bytecode resultsSkip Montanaro skip@pobox.com
Fri, 28 Feb 2003 11:48:38 -0600
    >> > Are you suggesting a test for LOAD_FAST before the switch,
    >> >
    >> > e.g.
    >> > if (opcode == LOAD_FAST) {
    >> >  // load fast
    >> > }
    >> > else switch (opcode) {
    >> >  // body
    >> > }
    >> 
    >> Yes.


    Damien> Hmm, I might even be able to do something like this:

    Damien> if (opcode >= LOAD_FAST_0) {
    Damien>     oparg = opcode - LOAD_FAST_0;
    Damien>     ...
    Damien>     }
    Damien> else switch (opcode) {
    Damien> }


I think you want "&& opcode <= LOAD_FAST_15" in there somewhere, or
something to cap the range of the test.  Now you've increased the cost of
the check, maybe making it no longer worthwhile.

Skip



RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4