Optimisation pipeline now available on Compiler Explorer

A while ago, I added basic Racket support to Compiler Explorer. (Check that post first if you're unsure about what CE is.)

As of today, this has now been enhanced by the addition of an optimisation pipeline view for Racket. This allows you to follow each linklet produced by the input module through various Racket and Chez compilation passes all the way down to assembly. The result of each pass is diffed with the previous to highlight any changes made.


The opt pipeline is currently only available when using the (recently added) Racket nightly snapshot compiler on CE. To add the opt pipeline, choose "Add new... -> Opt Pipeline" in the compiler section (right-hand portion by default). To hide passes which made no changes, choose "Filters -> Hide Inconsequential Passes".

Thanks to @mflatt, @sorawee, and @samth for reviewing the related Racket-side changes here.

Please let me know if you have any feedback! :smile:


@jryans speaking of optimization: in Computer Systems, A Programmers Perspective it talks about how if you apply loop optimizations to your c code then gcc will generate faster code even if ggc is run with optimizations enabled.

does racket work the same? if you apply some optimizations to your rackets code will the chez backend generate faster code?

Yes, there are some specific ways a program can be written to enable more optimization. This section may be of interest.