Mill Computing, Inc. Forums The Mill Architecture switches Reply To: switches

Ivan Godard
Post count: 627

Pick is a good way to implement the within() and without() functions (or their inverse includes() and excludes()). For a range check that involves branching rather than boolean result one can just use two branches. For calltr1 you need a single bool and the pick works. Yes, the predicates on predicated ops like calltr1 can see a pick; ain’t phasing wonderful?

We don’t generate range checks in switches; just a chain of less-than compares. Each less-than peels off the next range in sorted order.