<div dir="ltr">Can you isolate which of the hash table instances is slow? The basic hash table uses linear probing and may perform badly if the hash function has poor clustering behavior. Some versions of "hashable" set "hash = id" for Int, which may not help matters.<div>
<br></div><div>The benchmarks I have, as you suggest, say that it performs well -- but they are incomplete. I can't optimize what I don't test: if you can isolate a minimal example where it performs much worse than it should, I would appreciate that.</div>
<div><br></div><div>As far as Windows goes, I don't use it and don't have access to such a machine, I would need help to debug and fix this.</div><div><br></div><div>G</div><div><br></div></div><div class="gmail_extra">
<br><br><div class="gmail_quote">On Sat, Jan 18, 2014 at 10:38 AM, kyra <span dir="ltr"><<a href="mailto:kyrab@mail.ru" target="_blank">kyrab@mail.ru</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Having built Agda on 64-bit GHC 7.6.3 on Windows I've stumbled on Agda being unbearable slow (I tried it on Penryn and Sandy Bridge computers). The culprit turned out to be Agda uses 'BasicHashTable' in src/full/Agda/TypeChecking/<u></u>Serialise.hs (line 98).<br>

<br>
Switching either to Cuckoo or Linear immediately cures the problem.<br>
<br>
The problem does not manifest itself on 32-bit Windows build or any Linux build.<br>
<br>
Also 'Basic' hashtable perform better than Cuckoo and Linear in standard benchmarks on Win64. And at the same time in Agda scenario it's performance degrades by a *couple of orders of magnitude*!<br>
<br>
Thus, *all* things are important here: 64-bit, Windows, Agda use case.<br>
<br>
I wonder what stands behind this behaviour? What are specifics of 'Basic' hashtable implementation and how to fix this or should this be fixed at all?<br>
<br>
Regards,<br>
Kyra<br>
______________________________<u></u>_________________<br>
Libraries mailing list<br>
<a href="mailto:Libraries@haskell.org" target="_blank">Libraries@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/libraries" target="_blank">http://www.haskell.org/<u></u>mailman/listinfo/libraries</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>Gregory Collins <<a href="mailto:greg@gregorycollins.net" target="_blank">greg@gregorycollins.net</a>>
</div>