Fail Fast and Profile On: Towards a miniKanren Profiler
summary
Prototype miniKanren profiler instruments states to count encounters, successes, and failures per program point, and collects failed-state samples. Using those stats it recommends fail-fast reordering of conjuncts; one stalled query finishes in 37 ms after swapping a high-failure recursive call, and a selection‑sort run finds 5 of 6 permutations within 1,000 steps until a length check is added to eliminate long spurious candidates and recover all six.
AI-written summary · about
chapters (11)
- 0:00miniKanren profiler intro
- 1:04Project overview and motivation
- 3:05Running examples with profiler
- 4:12Debugging non-terminating queries
- 6:32Program point metrics analysis
- 8:00Statistics tracking implementation
- 10:44Debugging membero with paths
- 14:43Rejected states in selection sort
- 17:00Sampling failed states
- 19:18Future work and limitations
- 20:01Q&A
related talks
02h 44mMeasure, don’t guess: benchmarking stories from the trenches
43mStop Guessing and Start Measuring - Benchmarking in Practice
27mQuickly remove some big performance bottlenecks with QuickPerf
23mDon’t Trust Your Profiler: An Empirical Study on the Precision and Accuracy of Ja...
33m"It is correct, but is it fast?"
54mPerformance tests and other lies
42mSurprise yourself with Property Based Testing
02h 05mFrom slow to go: Rails test profiling hands-on
