topazproject / topaz

A high performance ruby, written in RPython
topazruby.com
BSD 3-Clause "New" or "Revised" License
1k stars 88 forks source link

Windows Version and Linux Performance #842

Open ghost opened 9 years ago

ghost commented 9 years ago

I came across Topaz and wondered what PyPy could bring to Ruby, so I thought I'd have a quick look.

I downloaded the Windows binary from topazruby.com, and the first issue was that the extension was a .tar.bz2 one (Windows users like .zip or .msi, these Linux file types are a pain to install).

Anyway, it was installed, but on typing 'topaz' it said I needed MSVCR110.DLL. So that was obtained (I had to download it from one of those dodgy-looking sites as I couldn't find an obvious official source).

Now, topaz starts, but it gave this error:

RPython traceback: File "topaz_main.c", line 159, in entry_point File "topaz_main.c", line 6320, in _entry_point Fatal RPython error: NotImplementedError

The readme.rst first suggests I resolve dependencies with "pip install .." but this is not something that can be done in Windows. It also goes on about compiling Topaz with a JIT, but I thought this was a ready-to-run binary?

Anyway, I give up on that and try the Linux version (for Ubuntu 32-bit running under Virtual Box under Windows 7 64-bit, however this usually does not affect performance.)

I don't know my way around Linux so that was a bit of a nightmare (what exactly do I /do/ with the binary file I download?), but I managed to download eventually, even if I had to hunt for where it had put it (and it only took a few minutes to remember I had to type ./topaz and not topaz).

So I now test it with this little program (sorry it's ignoring my indentation):

i=0 while i<100_000_000 i+=1 end print (i)

It took 75 seconds. The same on Windows, with Ruby 1.92, took about 5 seconds.

So I guess something is amiss? I've no idea how to do those suggestions in the Readme file, I did get the idea this was ready to go.

refi64 commented 9 years ago
  1. That DLL is part of the Visual C++ 2012 Redistributable. The download's at Microsoft...
  2. The NotImplementedError is reading from stdin. Doesn't work on Windows. I had a PR for that ages ago, but I'm not sure if it still works.
  3. Sounds like the JIT wasn't enabled?? Not sure; I'm not a Topaz dev. You could try building it yourself using -Ojit if you have 30 minutes to spare.