lo-tag-dispatch-engine now sorts tags, this ensures that >fixnum compiles more efficiently

db4
Slava Pestov 2008-11-06 00:02:10 -06:00
parent be798dd5e9
commit aac256324f
1 changed files with 4 additions and 2 deletions

View File

@ -3,7 +3,7 @@
USING: classes.private generic.standard.engines namespaces make USING: classes.private generic.standard.engines namespaces make
arrays assocs sequences.private quotations kernel.private arrays assocs sequences.private quotations kernel.private
math slots.private math.private kernel accessors words math slots.private math.private kernel accessors words
layouts ; layouts sorting sequences ;
IN: generic.standard.engines.tag IN: generic.standard.engines.tag
TUPLE: lo-tag-dispatch-engine methods ; TUPLE: lo-tag-dispatch-engine methods ;
@ -23,9 +23,11 @@ C: <lo-tag-dispatch-engine> lo-tag-dispatch-engine
] if ; ] if ;
M: lo-tag-dispatch-engine engine>quot M: lo-tag-dispatch-engine engine>quot
methods>> engines>quots* [ >r lo-tag-number r> ] assoc-map methods>> engines>quots*
[ >r lo-tag-number r> ] assoc-map
[ [
picker % [ tag ] % [ picker % [ tag ] % [
! >alist sort-keys reverse
linear-dispatch-quot linear-dispatch-quot
] [ ] [
num-tags get direct-dispatch-quot num-tags get direct-dispatch-quot