justinethier / cyclone

:cyclone: A brand-new compiler that allows practical application development using R7RS Scheme. We provide modern features and a stable system capable of generating fast native binaries.
http://justinethier.github.io/cyclone/
MIT License
823 stars 42 forks source link

Poorly optimized code #460

Open justinethier opened 3 years ago

justinethier commented 3 years ago

Cyclone is much slower than chicken 5 on the following benchmarks:

I suspect a lot of this is due to how cyclone poorly optimizes code using mutable operations. If that is the case it may be necessary to rewrite portions of the optimizer or take a deep look to figure out what can be done. For now the first step is to verify and update above accordingly.

This is related to issue #344

justinethier commented 3 years ago

In particular, performance on array1 and destruc is abysmal. I think a large part of the problem is our optimizer is extremely conservative when it comes to mutations (EG: vector-set!) and prevents most of the opportunities to optimize such code.