Re: Performance & Perl



robic0@xxxxxxxxx wrote:
> Or C?
>
> (Disclaimer: I have not delved into the Perl source)
>
> How close does Perl follow C as far as primatives?

Um, not at all. Perl primitives are scalar, self-resizing arrays,
and hashes. C primitives are floats, doubles, ints, bytes, etc, and
primitive arrays.


> Can I rely on Perl language constructs to follow C when
> writing performance code?

I have no idea what that means.

>
> In a runtime race will a Perl for loop time exactly the same as a
> C for loop?

No. A C for loop won't even time *exactly* the same as a C for loop.

>When the race begins, if not, why not?

Why would they?

>
> Any divergence in stack processing Perl to C?

I'm not exactly sure what that means, but I'm pretty sure the
answer is yes.

>
> Is there such a thing as a Perl "temporary" on the stack?
>
> Why would I need to care about any of this on a "higher level"
> language,

Um, I don't know. Why is purply my favorite color?

> or is Perl a higher level language?

Higher than what? C? Yes.

Xho

--
-------------------- http://NewsReader.Com/ --------------------
Usenet Newsgroup Service $9.95/Month 30GB
.



Relevant Pages

  • Re: Need help understanding how a file input block works
    ... here is a section of the Perl code that I am having ... ^ says 'match if we are at the start of the string', ... 'next' is documented in perldoc perl, in the sextion "Loop Control". ... which will stop you from using globals by accident. ...
    (comp.lang.perl.misc)
  • Re: perl newbie: leaner code ideas
    ... > To learn Perl, I have written a bit of code that needs to do the following: ... Don't declare variables prematurely. ... if the foreach loop contriol variable has already been ... variable as a foreach loop contriol variable without an explicit "my". ...
    (comp.lang.perl)
  • Re: Noob! Help required and would be really appreciated!
    ... You've read 60% of "Learning Perl"? ... On finding the keyword "New Order", it has to start building a hash. ... want to build a loop around this hash creation. ... transferred to %allOrders. ...
    (comp.lang.perl.misc)
  • Re: Perl and Python, a practical side-by-side example.
    ... suggest a few minor edits to the Perl version. ... list then it's better to declare the variable directly in the loop ... for my $piid ){ ... #If the current record is the correct state ...
    (perl.beginners)
  • Re: Kqueue
    ... > In the case of kqueue(), you are either blocking or timing out on ... usually in a tight loop. ... Perl is simply not suited to this ...
    (comp.lang.perl.modules)