Author Topic: XMPlay compression method  (Read 4961 times)


  • Posts: 1168
XMPlay compression method
« on: 31 Jul '03 - 13:17 »
Was randomly browsing through the MSDN library and came across a certain compiler option for C++, namely "/Oq". It is apparently no longer enabled but what it did do was toggle P-code generation for the program. That caught my eye since as a VB programmer I know a bit about P-code. It usually halves the program size or better at a small cost of performance (not noticeable nowadays).

I was wondering, Ian: do you use P-code for XMPlay? That would explain why ProcDump choked on XMPlay.

Ian @ un4seen

  • Administrator
  • Posts: 25060
Re: XMPlay compression method
« Reply #1 on: 31 Jul '03 - 15:30 »
Nope, XMPlay does not use "p-code".

As far as I'm aware, "p-code" = psuedo-code = interpreted = slower :)


  • Posts: 1168
Re: XMPlay compression method
« Reply #2 on: 31 Jul '03 - 18:04 »
It's not always slower. Well-written p-code can easily outperform not-so-well written native code. In fact unless you're doing lots of processor-intensive stuff then the size advantage outweighs the performance loss. Also if you're calling the windows API a lot then most of your program's code is executing in there, so again the performance loss makes no difference.

As a VB programmer I know about this, since native code compilation didn't appear in VB until version 5. With VB p-code is nice as it compiles *very* fast, and produces *very* (typically 50% of the native version) small executables. Usually if you want real speed you'll be using C++ anyway, so it's nice to be able to compile the programs quickly. I'm using p-code for a scripting utility I'm putting together, as it's not speed-orientated and the reduce in size is nice as it means that it will take less time to download.