Hi, I'm a few hours into the Iczelion Tutorials, I'm seeing the following sequence a lot...

    push hInstance
    pop wc.hInstance
When I go to the Opcode help I get about 10 ticks for the sequence on a 486. I replace with the following (2 ticks?) to no ill effect...at least up to tute #5

    mov eax, hInstance
    mov wc.hInstance, eax
Am I missing something?
Posted on 2001-03-24 15:47:00 by rafe
rafe, The timings from later processors reduce that a lot so its really a matter of convenience to use push/pop as it does not use a register. The other factor is that loading a structure for an API call is by no means speed critical as API calls are slow in comparison to assembler. Where it will be useful to you is where you start coding speed critical loops, in many instances, using a register to copy memory from one location to another is faster so its worth knowing about the difference. Regards, hutch@pbq.com.au
Posted on 2001-03-24 16:10:00 by hutch--