Exupery FAQ 1.0

9 October, 2006

Giovanni Giorgi has tried Exupery, the Squeak byte compiler written by Bryce Kampjes. Exupery is still in beta but is usable for experimenting.
The Weekly Squeak is happy to publish a prime-time FAQ on it.

First of all, the master reference for exupery is the omnipresent wiki.

I have done a small interview to Bryce Kampjes, and we ended up building an interesting FAQ for Exupery.

Q: What is Exupery?
A: Exupery is a native code compiler for Squeak. It translates byte-code into machine code. It can compile most methods which don’t include primitives and a handful of primitives. It is becoming something like a JIT but with the compiler written in Smalltalk. At the moment, it can dynamically inline a handful of primtives but not full methods.

Q: Exupery is not only a “Just in time compiler” (JIT) as we will see in the next few answers. What does “Exupery” means?
A: It’s named after a French author and early aviator.

Q: I have installed if from SqueakMap. How can I use it?
A: Instructions in the wiki pages above. But you’ll need a custom VM. I’ve had to modify the VM so it’ll jump into the native code from interpreted code. For now you need to manually compile methods.
In the latest development builds the following is good:

ExuperyProfiler optimise: [ExuperyBenchmarks new compilerBenchmark].
Exupery dynamicallyInline.

The first line profiles the expression in the block then tries to compile the hot spots. The second line inlines any primitives called by compiled code.
[See this link for the VM]

Q: Can I compile my class and try it at my own risk?

Q: Can I compile only some classes?
Exupery will only ever compile some methods. It’s goal is to compile frequently called methods well producing good code, rather than all methods quickly. You tell it to compile methods rather than classes.

Q: How much stable is Exupery? Can I use it for my important Flower Collection Blog? (Ok I was just kidding, I haven’t a Flower blog… 😉
Yes, but it’s still an alpha compiler. Expect bugs and crashes. If you really need to speed up your blog, then compile the critical methods and script compilation. Don’t let Exupery use it’s profiler or any dynamic compiler in production. That should allow you to test it better.For now, if you really want to use it in production explicitly compile the methods that you think will lead to a speed gain then test it. This should reduce the risk of crashes.

Q: Can I use MessageTally to profile Exupery and compare against interpreted code?
Not at the moment. The problem is compiled code does not check for interrupts so MessageTally will never see it.To compare use

Time millisecondsToRun: [...].

Q: I want to come back! Is it easy?
You can always stop using Exupery. At any point you can tell it to remove all compiled code from the system. There are VM hooks, but it removes all compiled contexts before saving so it’s always possible to go back to a vanilla VM. If you go back to a vanilla VM you are in exactly the same place you were before you started experimenting with Exupery (besides having a few extra classes in the image).

Q: I’d like to work on Exupery. Where should I start?
Q: Join the exupery mailing list and ask for things to work on. Say what you’re interested in doing. If you email me, I’ll reply.
There’s a decent amount of stuff to do. The first thing is probably building an Exupery VM. For most things it helps to have a local build environment both for staying current and for debugging. If you’re just working on in-image stuff, say the profiler or testing then you could live with pre-compiled VMs. But if you want to work on new primitives or features then you’ll need to be able to debug. At a minimum that involves recompiling VMs to add logging.
I can only supply Linux VM’s. If you’re running another OS, then you’ll need to build your own or get one from someone else.

Final words
We thank a lot Bryce Kampjes for the rapid reply. We hope this FAQ will help Squeak fan to try Exupery. That said, your comments are welcome: please ask more question so that we can enhance this document.
We feel that Exupery is a very interesting project, and can attract many developers because of the performance gain.

One Response to “Exupery FAQ 1.0”

  1. […] Also, don’t forget to read to our little Exupery FAQ! Posted by gcorriga Filed in Exupery […]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: