Actually that was pretty good for an early version. You could help IMCC out by not creating those PerlUndefs until you're going to assign to them.
Also, anytime you use a temporary to assing a constant literal, you should be able to use a I/S/N reg. Parrot's ops are polymorphic so you should have a lot of flexibility even with the basic types.
Vtable jump isn't really that much overhead in a language like C. Parrot's already running pretty fast. We're making things fast by keeping it in mind while implementing it, including a rich opcode and vtable so the number of said slow dispatches are small, among other various things that I don't know. Maybe Dan will chime in here :-)
Thies, have you actually benchmarked your sample with JIT against PHP?
It's great that you're doing PHP for Parrot.
Luke
Darn right!
-Melvin