Re: VB6+ Article in VSM by Bill McCarthy

From: Dan Barclay (Dan_at_mvps.org)
Date: 03/08/04


Date: Mon, 8 Mar 2004 16:56:37 -0600

Gary,

I use native, and I do see speed increase on my critical code. However, the
critical code is probably different than yours. It's an interpreter working
on integer arrays (state machine using integers).

Compiled code can be a big help on speed and, had they really done things
right, it would always be faster. Too bad it isn't. YMMV! Bottom line is
that developers simply have to test it both ways with their own code. Also,
benchmarks of snippets don't always tell the story either.

The *only* valid reason I know of that interpreted code should be faster
would be a very small loop that might remain entirely in the cpu pipeline vs
larger native code footprint that would have to be retrieved from memory.
In practice, that really doesn't seem to happen very often. Not that it
matters, since neither seem to have been optimized for that.

Dan

"Gary Nelson" <gn@nospam.com> wrote in message
news:OwSjLCUBEHA.2484@TK2MSFTNGP12.phx.gbl...
> > Hmmm... What are the PRO's of using Pee-Code?¿?
>
> I use PCode quite extensively, except for very small programs.
>
> 1) Compile time: It compiles much faster which can be very significant in
a
> large exe that might get compiled several times in a day's work.
>
> 2) It is less than half the size. This is very significant if you are
> sending it over then Internet.
>
> Comparison of a typical program on a P-IV 3.06 GHz.:
>
> PCode Native
> ===================================
> Compile time: 16 sec. 60 sec.
> Exe. size: 2.098 MB 5.688 MB
> Zip size: 788 KB 1.724 MB
>
> After having done extensive testing I have seen very little perceptible
> speed increase using native compile. Also, since I am an old-timer I have
a
> lot of GoSubs, which are much faster with PCode.
>
> Gary
>
>



Relevant Pages

  • Re: creaping coupling......
    ... In C++ it would be trivial to break that source code dependency, ... When you compile a .java module, ... In Java and C# it's asserted at compile time. ...
    (comp.object)
  • Re: VB Compiler Warnings & other woes ...
    ... you will get this warning in vs 2005. ... > have a direct legacy language path of evolution to consider. ... >> compile time errors rather than runtime. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: No exceptions?
    ... time that was removed before runtime; there's no way to generate a compile time exception for the unexceptionable, but there are not many ways of avoiding a runtime exception if the compile time y had defined attributes. ... Thus, as soon as one compiles a statement that references any such resource, one would get a compile-time error. ... I think many products go to elaborate lengths and introduce arbitrary concepts to handle such cases, at least some of them try to prevent catalogue updates in a transaction (Jim Gray described a logical '2-phase' protocol for intension locks many years ago and I've seen it implemented and I've seen the complications that seem never to end due to the intricacy, for example a reversal of Jonathan's converse problem, a sequential transaction that references y and then deletes y's definition - what should happen if the reference is then referred to again? ...
    (comp.databases.theory)
  • Re: RAD vs. performance
    ... iterable object--whether or not the object is an array or list is ... return ret ... known at compile time. ...
    (comp.lang.misc)
  • Re: apparently undefined function called by macro
    ... However, as almost always in Common Lisp;), there are exceptions to this rules: Some top-level forms do indeed have effects at compile time. ... The reason is that you typically want to base subsequent code on your macro definitions, and the compiler must be able to completely macro-expand away these macro definitions as well. ... A system definition allows you to declare that one file of lisp code depends on some other file of lisp code. ...
    (comp.lang.lisp)