Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

Re^3: Perl 5 Optimizing Compiler

by eyepopslikeamosquito (Chancellor)
on Aug 13, 2012 at 07:53 UTC ( #987064=note: print w/replies, xml ) Need Help??

in reply to Re^2: Perl 5 Optimizing Compiler
in thread Perl 5 Optimizing Compiler

I too would like to see perlcc revived and it appears that it is already being revived by Reini Urban on CPAN. What I think is way too ambitious, especially for the timeframe suggested, is the OP's stated performance goal of "making Perl run at speeds within an order of magnitude of optimized C".

Replies are listed 'Best First'.
Re^4: Perl 5 Optimizing Compiler
by rgiskard (Hermit) on Aug 13, 2012 at 08:16 UTC
    Right, well I too feel that premature optimization is the route to all evil. I personally would find it hard to compete with native C; however, I do recall Java having similar speed issues (it being non-natively compiled). Then (over the course of a decade) everyone swapped out boxes for VMs... Virtual Machines which, perhaps inspired by slowness, happened to use the speed which a Java program runs as a common benchmark. So everyone started optimizing their VMs to run Java programs quickly. We are now at that point where Java can run as fast (or faster) than a "native" application (clearly depending on your environment and how you define native). I didn't know Reini was doing something like this... am checking it out now.

      From Type system (wikipedia):

      Certain languages, for example Clojure, Common Lisp, or Cython, are dynamically typed by default, but allow this behaviour to be overridden through the use of explicit type hints that result in static typing. One reason to use such hints would be to achieve the performance benefits of static typing in performance-sensitive parts of code.

      So, to get close to (statically typed) Java in terms of speed, Perl 5 would need to make significant tweaks to its type system and the way it handles polymorphism, as indicated by chromatic's response. See also MJD article (2001), which explains why making Perl as fast as C is problematic.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://987064]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (6)
As of 2018-06-23 12:50 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (125 votes). Check out past polls.