[#68478] Looking for MRI projects for Ruby Google Summer of Code 2015 — Tony Arcieri <bascule@...>

Hi ruby-core,

10 messages 2015/03/10

[ruby-core:68465] Re: GSoC 2015: JIT Compiler

From: Jakub Trzebiatowski <jaktrze1@...>
Date: 2015-03-09 11:21:30 UTC
List: ruby-core #68465
> Are you referring to this:
> https://github.com/rubygsoc/rubygsoc/wiki/Ideas-List ?
> I=E2=80=99m not sure you'll get feedback from the responsible people =
on this list; maybe making a pull request is an easier way to get their =
attention.

You are probably right, I=E2=80=99ll do so. I was hoping that I can =
catch responsible people on ruby-core. 2-16 March Interim Period is =
described by Google: =E2=80=9CWould-be students discuss project ideas =
with potential mentoring organizations=E2=80=9D. And I still don=E2=80=99t=
 know who represents Ruby/MRI.

> What do you mean by =E2=80=9Call remaining 8 days?".

My reasoning was something like: If my project proposal would be =
=E2=80=9CImplement a Ruby -> LuaJIT bytecode=E2=80=9D, I=E2=80=99d have =
to prove that=E2=80=99s such a compilation is  possible _in_ the =
proposal. 8 (now 7) days are left to the start of Students Applications, =
so I=E2=80=99ll try to prove that till then.

> As for feasibility, I think the most difficult part would be to handle =
Ruby's blocks. I don=E2=80=99t think Lua has blocks, so this may be =
hard.

You are right. That would be easy if not that crazy procs, that can =
return not to the caller, but to blocks=E2=80=99s enclosing method! =
I=E2=80=99ll try to implement something block-like in Lua today. If =
that=E2=80=99s impossible in pure Lua, there=E2=80=99s still hope that =
generated LuaJIT bytecode can manage that, because bytecode is more =
powerful that the language itself.

> I am not involved in this, so I can=E2=80=99t give you a definitive =
answer, but I think it would be good to try out whether/how Ruby can be =
sped up by JIT compilation.

I ported a Ruby mandelbrot benchmark to Lua, using a simplified Ruby=E2=80=
=99s object model (I believe that Ruby could be compiled to the same =
bytecode). The speedup was 40x. I=E2=80=99m aware that mandelbrot =
generation is not actually a real-world example of Ruby code, though. =
And that object model is not ready. It lacks good eigenclass support.

> Maybe the goal of the project should just be to implement some JIT =
compilation; whether this is done from YARV to e.g. LLVM,

LLVM is heavy and doesn=E2=80=99t seem to be directly suitable for a JIT =
compiler. But it=E2=80=99s featured, it=E2=80=99s true. On the other =
hand, LuaJIT is a two-in-one: lighting-fast interpreter and a modern =
tracing JIT compiler. The only issue: it models Lua, not Ruby. I=E2=80=99m=
 trying to workaround that.

> or from Ruby directly to something like LuaJIT, or from YARV to =
LuaJIT, could be an implementation decision by the student (together =
with the mentor).

That would be cool and flexible. Maybe I=E2=80=99ll try to write a good =
student proposal describing my research about LuaJIT bytecode, but with =
a note that an actual technology to be used can be discussed with a =
mentor=E2=80=A6 I=E2=80=99m not sure what=E2=80=99s the best strategy. =
Contact to responsible people would help so much, whoever they are.

---
Jakub Trzebiatowski
Computer science student
Gda=C5=84sk University of Technology


In This Thread

Prev Next