[racket-dev] Slow contracts

From: Robby Findler (robby at eecs.northwestern.edu)
Date: Fri Jun 13 01:20:37 EDT 2014

On Tue, Jun 10, 2014 at 2:27 AM, Eric Dobson <eric.n.dobson at gmail.com> wrote:
> On Mon, Jun 9, 2014 at 9:46 PM, Eric Dobson <eric.n.dobson at gmail.com> wrote:
>> Splitting this out because this is actually a different issue. This is
>> about us generating slow contracts.
>>
>> There are two things in play here.
>>
>> One is that TR doesn't use the new lazy parts of struct/dc. This would
>> require changing struct contracts from flat contracts to
>> chaperone-contracts. Given that I think we are going to need to change
>> struct contracts to sometimes be chaperone contracts anyways for
>> soundness that might not be a huge loss.
> I did performance measurements and it is about a factor of 60 slower
> for lazy chaperone contracts. I see a couple of ways to improve these
> numbers, so they could be better in the future with a bit more work on
> optimizing. Given that strict contracts actually change the big O
> notation I think that this is a reasonable performance price to pay,
> given that data structures with more than 60 elements are fairly
> common.

Does it make sense to try to find the break-even point for a program
that, say, makes two passes over the data-structure?

Robby

Posted on the dev mailing list.