[Ur] little benchmark on querying a table only

Marc Weber marco-oweber at gmx.de
Mon Dec 20 17:19:37 EST 2010


Excerpts from Chris Double's message of Mon Dec 20 09:56:27 +0100 2010:
> I tried a quick version that uses an 'each' instead of a List.app of a
> temporary list. Unfortunately my initial attempt resulted in a program
> that never seems to complete compilation. See mantis issue 44.

Adams reply on mantis:

      This is an undocumented behavior of the optimizer, which tries to
      remove all uses of higher-order functions. For your example, this
      involves building a version of [each] for every possible argument,
      which of course includes 1000 different possibilities here! If you
      separate [f] into a separate argument, and put it first (since the
      optimizer only specializes a prefix of initial arguments with
      function types), then everything works fine.

Nevertheless its unsatisfactory that the compiler doesn't stop/  fail in
reasonable time.

If there is an easy way aborting in such case (where its known that
there are 1000+ cases - can you make the compiler fail ?)

It always is a lot better to have a message which tells you what was
going wrong.

I didn't find a way to add a comment to that issue.

Marc Weber



More information about the Ur mailing list