Previous to the split core:
The .koka folder after running stack testwc -l *
Goes from 4690331 to 4196774. ~ 10% reduction in generated code
With the new splitted core and implicits this is not as effective, only a 2% reduction in generated code:
856525 total
839587 total
To address this properly, we ought to create a core representation that lifts all lambdas to first order functions with their associated closure state, and then address closure state drop-reuse along with closure state canonicalization, and do the canonicalization across modules (reusing canonical closure state types from dependent modules).
Previous to the split core: The
.koka
folder after runningstack test
wc -l *
Goes from 4690331 to 4196774. ~ 10% reduction in generated codeWith the new splitted core and implicits this is not as effective, only a 2% reduction in generated code: 856525 total 839587 total
To address this properly, we ought to create a core representation that lifts all lambdas to first order functions with their associated closure state, and then address closure state drop-reuse along with closure state canonicalization, and do the canonicalization across modules (reusing canonical closure state types from dependent modules).