[racket] Cost of the contract boundary in the math library

From: Matthias Felleisen (matthias at ccs.neu.edu)
Date: Sat Nov 3 17:42:37 EDT 2012

On Nov 3, 2012, at 1:46 PM, Neil Toronto wrote:

> Higher-order functions, though, are dog slow. In particular, all the array functions are higher-order, because an array is just a function with a rectangular domain; e.g. `array-map' is composition. 

That's the only thing I am talking about. And your 33x slowdown is what I am afraid of. 

>> If it is bad, we should consider including both a typed and an untyped
>> variant where the latter is generated from the former (I believe
>> you are working in TR so that's why I wrote the last sentence).
>> That is, when the library is installed the Untyped one should be
>> generated by disabling types and type checking.
> We should consider it, then, unless there's a way to significantly speed up a type's generated, higher-order contracts.
> I'm a bit confused about how this would help, though. The interface between the library and the user will still have to be contracted, so where does the performance gain come from?

No, the idea would be that the generate version does NOT use contracts and avoids the cost. -- Matthias

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4373 bytes
Desc: not available
URL: <http://lists.racket-lang.org/users/archive/attachments/20121103/4607afaf/attachment-0001.p7s>

Posted on the users mailing list.