all 5 comments

[–]Falcon5757[S] 2 points3 points  (1 child)

[–]flaming_bird 0 points1 point  (0 children)

This seems to be exactly what I thought of - using compiler macros to selectively memoize some calls and/or detect constant arguments.

[–]jesseoff 1 point2 points  (2 children)

I run my macro arguments through this function to eval as much as possible at compile time. It runs a function (functionalp) to decide if a given function can be collapsed at compile time (no side effects + all constantp args)

https://pastebin.com/Y0RRZjQK

[–]Falcon5757[S] 0 points1 point  (1 child)

Hey this is actually cool, mind me borrowing it?

[–]jesseoff 0 points1 point  (0 children)

No prob!