Closed athas closed 3 months ago
@WilliamDue With this change, futhark cuda --library json.fut
takes 14s on my machine (vs 73s before). I think I can still make it a bit faster. Also, this is an OK demonstration of how many places you have to modify the compiler when adding a fundamental new language construct.
Now down to 9.5s.
Now 6.1s. Last bottleneck seems to be lexing.
Currently only handles one dimensional arrays, but could be extended. Since this is only useful for generated code, I don't think wider applicability is important.
There is still work to do in the frontend, where some passes (e.g. monomorphisation) do not handle this particularly efficiently. We may want to also add ArrayVal to the frontend language, and desugar to it during full normalisation.