On Sunday, June 27, 2021 at 10:29:55 AM UTC-4 Robby Findler wrote: > Replacing ` (~r x #:precision 1)` with `(number->string x)` and ditto for > `y` eliminates the overhead of contracts and brings about another 4x > speedup on my machine. >
This is because the compiler is able to remove the contract checks, not because number->string doesn't have a contract, correct? If it is the compiler, is there any rule of thumb to determine when the compiler will likely remove the contract checks? Using typed 'for' iterators seems to be one case that the compiler optimizes, but can we rely on others? Thanks, Jonathan -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/5e10f23a-7895-42d9-b475-802e08d0ee56n%40googlegroups.com.