[Haskell-cafe] Caching functions compiled with llvm-hs
Henning Thielemann
lemming at henning-thielemann.de
Sun Jul 12 10:32:27 UTC 2020
On Sun, 12 Jul 2020, Tom Westerhout wrote:
> On 11/07/2020, Georgi Lyubenov <godzbanebane at gmail.com> wrote:
>> Is there something wrong with your idea? (other than ideological issues
>> with unsafePerformIO - I guess then the standard approach would be to
>> use some State holding your compiled functions or a Reader over an MVar
>> holding your compiled functions)
>
> The part that feels wrong here is that one has to create a new Module
> for every single function. I always thought of LLVM Modules as kind of
> compilation units.
Right. Your module can contain multiple functions and they are compiled
and optimized together by LLVM. But if you want to cache every single
function then a one-function-module is fine.
More information about the Haskell-Cafe
mailing list