On Tue, Dec 11, 2001 at 10:09:07AM -0500, Gregor N. Purdy wrote: > - runops_generic(core, interpreter, pc); > + if ((interpreter->flags & PARROT_PREDEREF_FLAG) != 0) { > + size_t offset = pc - (opcode_t *)interpreter->code->byte_code; > + > + if (!interpreter->prederef_code) { > + interpreter->prederef_code = (void **)calloc(interpreter->code->byte_code_size, sizeof(void *)); > + } > + > + runops_prederef(interpreter, pc, interpreter->prederef_code + offset); > + } > + else { > + runops_generic(core, interpreter, pc); > + } > + } > + > + if (interpreter->prederef_code) { > + free(interpreter->prederef_code); > + interpreter->prederef_code = NULL; > I haven't tried this, so feel free to shoot me down, but is your 22% speed-up based on an unpatched Parrot, or a patched Parrot without the -P flag? I'm trying to work out whether or not this patch actually slows down the general case, which wouldn't be pleasant. -- Timesharing just doesn't work. -K. Thompson, 1982.Thread Previous | Thread Next