The Compiler Is Complete

View: New views
8 Messages — Rating Filter:   Alert me  

The Compiler Is Complete

by Charles Oliver Nutter-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I just finished up compilation on BEGIN and END blocks, which brings the
compiler to completion. I've also successfully been able to compile the
entire standard library and run IRB and RubyGems entirely off compiled
scripts (i.e. I deleted all the .rb files).

OptN doesn't compile and never will; we will just wrap script execution
with the appropriate logic. I'll monkey with that later; nobody uses -n
that I know of.

RubyGems seemed to start up quite a bit slower than with the
interpreter, so I'll do some investigation on that. And there's scads of
optimizations left to do in the compiler and in the load sequence. But
any work after this will be bug fixing and optimization.

The Compiler Is Complete.

(and I have first dibs on blogging it)

- Charlie

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email


Re: The Compiler Is Complete

by Ola Bini-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Charles Oliver Nutter wrote:

> I just finished up compilation on BEGIN and END blocks, which brings
> the compiler to completion. I've also successfully been able to
> compile the entire standard library and run IRB and RubyGems entirely
> off compiled scripts (i.e. I deleted all the .rb files).
>
> OptN doesn't compile and never will; we will just wrap script
> execution with the appropriate logic. I'll monkey with that later;
> nobody uses -n that I know of.
>
> RubyGems seemed to start up quite a bit slower than with the
> interpreter, so I'll do some investigation on that. And there's scads
> of optimizations left to do in the compiler and in the load sequence.
> But any work after this will be bug fixing and optimization.
>
> The Compiler Is Complete.
>
> (and I have first dibs on blogging it)
>
> - Charlie
Good work!

I was thinking if the slowness of loading is because of all the class
loaders used... Would it make sense to let the standard library run with
the same class loader, you think?
And in the same manner, when we're talking about compiling RubyGems on
installation, having the same class loader for the whole gem seems to
make sense, neh?

Cheers

--
 Ola Bini (http://ola-bini.blogspot.com)
 JRuby Core Developer
 Developer, ThoughtWorks Studios (http://studios.thoughtworks.com)
 Practical JRuby on Rails (http://apress.com/book/view/9781590598818)

 "Yields falsehood when quined" yields falsehood when quined.



---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email


Re: The Compiler Is Complete

by Charles Oliver Nutter-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Ola Bini wrote:
> I was thinking if the slowness of loading is because of all the class
> loaders used... Would it make sense to let the standard library run with
> the same class loader, you think?
> And in the same manner, when we're talking about compiling RubyGems on
> installation, having the same class loader for the whole gem seems to
> make sense, neh?

Yes, I have been thinking the same thing, and trying to reconcile how to
know when we should switch to a different classloader for new methods.
Since "def" is always a runtime operation, there's no clear distinction
between doing

while true; def some_method; end; end

and doing

def some_method; end

But the first case would leak classes if it always generated, say,
invokers into the same classloader.

I also would like to find a way to reduce the overhead of starting up
the class, possibly by generating a single custom call adapter per
compiled class that has custom methods for each call site and n * 3
fields for the inline cache; that would allow a single object to be
constructed rather than one per invocation.

There's a lot of room for improvement here.

- Charlie

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email


Re: The Compiler Is Complete

by John Wells-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


----- "Charles Oliver Nutter" <charles.nutter@...> wrote:
> The Compiler Is Complete.

Congratulations guys. I'm extremely excited to soon benefit from all your hard work! ;)

John

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email


Re: The Compiler Is Complete

by Bugzilla from tsuraan@gmail.com :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> The Compiler Is Complete.
>
> (and I have first dibs on blogging it)

Congratulations!

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email


RE: The Compiler Is Complete

by Peter K Chan :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

That's great, Charles.

What about the memory aspect of the compiler? I know that it is still early in
the construction, but can you give some idea as to whether a compiled JRuby
app will be heavier or lighter than a regular interpreted JRuby app?

Peter

-----Original Message-----
From: Charles.O.Nutter@... [mailto:Charles.O.Nutter@...] On Behalf Of
Charles Oliver Nutter
Sent: Thursday, September 27, 2007 11:16 PM
To: dev@...
Subject: [jruby-dev] The Compiler Is Complete

I just finished up compilation on BEGIN and END blocks, which brings the
compiler to completion. I've also successfully been able to compile the
entire standard library and run IRB and RubyGems entirely off compiled
scripts (i.e. I deleted all the .rb files).

OptN doesn't compile and never will; we will just wrap script execution
with the appropriate logic. I'll monkey with that later; nobody uses -n
that I know of.

RubyGems seemed to start up quite a bit slower than with the
interpreter, so I'll do some investigation on that. And there's scads of
optimizations left to do in the compiler and in the load sequence. But
any work after this will be bug fixing and optimization.

The Compiler Is Complete.

(and I have first dibs on blogging it)

- Charlie

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email


Re: The Compiler Is Complete

by Charles Oliver Nutter-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Peter K Chan wrote:
> That's great, Charles.
>
> What about the memory aspect of the compiler? I know that it is still early in
> the construction, but can you give some idea as to whether a compiled JRuby
> app will be heavier or lighter than a regular interpreted JRuby app?

Most signs point to it being lighter than interpreted, but we can't say
for certain yet. Also, if compiled classes can be made to share across
multiple runtimes, then there should be significantly lower memory costs
per extra runtime, where the costs were identical in interpreted mode.

- Charlie

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email


Re: The Compiler Is Complete

by Robert Egglestone :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

This is awesome, congratulations!


Charles Oliver Nutter wrote:

> I just finished up compilation on BEGIN and END blocks, which brings
> the compiler to completion. I've also successfully been able to
> compile the entire standard library and run IRB and RubyGems entirely
> off compiled scripts (i.e. I deleted all the .rb files).
>
> OptN doesn't compile and never will; we will just wrap script
> execution with the appropriate logic. I'll monkey with that later;
> nobody uses -n that I know of.
>
> RubyGems seemed to start up quite a bit slower than with the
> interpreter, so I'll do some investigation on that. And there's scads
> of optimizations left to do in the compiler and in the load sequence.
> But any work after this will be bug fixing and optimization.
>
> The Compiler Is Complete.
>
> (and I have first dibs on blogging it)
>
> - Charlie
>
> ---------------------------------------------------------------------
> To unsubscribe from this list please visit:
>
>    http://xircles.codehaus.org/manage_email
>

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email