[Haskell-cafe] Speeding up trivial programs

Teofil Camarasu teofilcamarasu at gmail.com
Fri Aug 23 20:22:15 UTC 2024


Hi Tom,

On my computer (and using GHC-9.8) it's a bit quicker:
real    0m0.006s
user    0m0.001s
sys     0m0.005s

I imagine some of this time is just loading things into memory and/or
running the dynamic linker.

If you are optimising for start up time, maybe fully statically linking
your executable might help.

Cheers,
Teo

On Fri, Aug 23, 2024 at 9:02 PM amindfv--- via Haskell-Cafe <
haskell-cafe at haskell.org> wrote:

> On Fri, Aug 23, 2024 at 03:19:28PM -0400, Brandon Allbery wrote:
> > I think I'd be reconsidering _any_ design involving running an external
> > program many times like that, to be honest. Dragging in potential fork
> > delays and other overhead that a benchmark probably won't show you
> doesn't
> > appeal.
>
> Calling short-lived unix processes many times (note I didn't say where or
> when) might not be the right solution to most problems. (That's probably
> why I've never noticed this timing floor before.) But trust me, it is a
> real -- and actually sensible in context -- requirement here.
>
> Server/client communication is unfortunately not possible in this case.
> Rewriting entirely in a language other than Haskell is possible, but not
> what I'd prefer given that the code is fairly complex (if fast).
>
> Does anybody know more about what specifically is happening during these
> 150ms?
>
> Thanks,
> Tom
> _______________________________________________
> Haskell-Cafe mailing list
> To (un)subscribe, modify options or view archives go to:
> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
> Only members subscribed via the mailman list are allowed to post.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20240823/93fbbf9c/attachment.html>


More information about the Haskell-Cafe mailing list