MilesCranmer / DispatchDoctor.jl

The dispatch doctor prescribes type stability
Apache License 2.0
128 stars 6 forks source link

Fix closure specialization issue #8

Closed MilesCranmer closed 1 month ago

MilesCranmer commented 1 month ago

Fixes #5 and other issues related to the use of closures preventing specialization.

This solves the issue by generating two functions:

  1. with a new name, but the old body
  2. with the old name, but a type-checking body

Thus the specialization will be as good as normal Julia code.

coveralls commented 1 month ago

Coverage Status

coverage: 98.571% (-0.5%) from 99.107% when pulling 89498e47b504e9089cd4c1ca63ab3fc28d6e5d98 on fix-closures into 99ff00dbad672b854bf5805c6e3a19e5ad40e5cb on main.