Just another Perl shrine | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
ake a close look at the data definitions for Interpreter, SV_any, HEK, COP etc. Isn't that the most concise (and thorough) description of the entire perl internals you've ever seen? Doesn't it nake you wonder (just a little), what could it do with all that information?No, not in the slightest. I think this is the fundamental impedence mismatch between you and me on this subject. You keep asserting that if LLVM can only be given a full picture of the program, it will be able to do (unspecified) wonderful things with it. I come from the viewpoint that for perl to perform a particular action, e.g. my $x = $h{$key}, there are a certain basic number of things the underlying hardware is going to have to at some point, such as calculate a hash index, index into the hash bucket, scan the hash bucket for a matching string, retrieve the associated SV, then copy the relevant part of the SV (e.g. its integer value, or its string buffer) into the SV stored in a pad somewhere that's associated with the name $x. Now at the moment, there's a certain amount of overhead associated with doing that via the perl stack and the perl runops loop, but there's still a basic mimimum that needs doing. I earlier showed that the overhead is probably less than 20%. To get better than this, LLVM has got to, in some magical way, cut into basic underlying operations like hash lookup. And I really don't think its going to that. Until someone provides me with a single actual concrete example of how LLVM might do anything better than just cut out a bit of that overhead, I'm not going to believe it. PS I completely fail to understand the the point of your showing how run.c gets converted to IR. run.c just contains a single trivial C function, operating on a few args and variables of particular types, and the IR knows the types of those args. So what? Dave In reply to Re^5: Perl 5 Optimizing Compiler, Part 5: A Vague Outline Emerges
by dave_the_m
|
|