Skip to content

Commit 72012cc

Browse files
authored
Merge pull request #1232 from herbie-fp/faster-colonnade
Fix attribution of `exprs-to-branch-on`
2 parents a87b654 + ce62095 commit 72012cc

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/core/regimes.rkt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
(fprintf port "#<option ~a>" (option-split-indices opt)))])
2727

2828
(define (pareto-regimes sorted ctx)
29+
(timeline-event! 'regimes)
2930
(define err-lsts (batch-errors (map alt-expr sorted) (*pcontext*) ctx))
3031
(define branches
3132
(if (null? sorted)
@@ -51,7 +52,6 @@
5152
;; can insert a timeline break between them.
5253

5354
(define (infer-splitpoints branch-exprs alts err-lsts* #:errs [cerrs (hash)] ctx)
54-
(timeline-event! 'regimes)
5555
(timeline-push! 'inputs (map (compose ~a alt-expr) alts))
5656
(define sorted-bexprs
5757
(sort branch-exprs (lambda (x y) (< (hash-ref cerrs x -1) (hash-ref cerrs y -1)))))

src/reports/timeline.rkt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -442,8 +442,9 @@
442442
`(tr (td ,(~a key) (td ,(~a val)))))))))
443443

444444
(define (render-phase-counts alts)
445-
(match-define (list (list inputs outputs)) alts)
446-
`((dt "Counts") (dd ,(~r inputs #:group-sep "") "" ,(~r outputs #:group-sep ""))))
445+
`((dt "Counts") ,@(for/list ([rec (in-list alts)])
446+
(match-define (list inputs outputs) rec)
447+
`(dd ,(~r inputs #:group-sep "") "" ,(~r outputs #:group-sep "")))))
447448

448449
(define (render-phase-alts alts)
449450
`((dt "Alt Table")

0 commit comments

Comments
 (0)