]> gitweb.factorcode.org Git - factor.git/commitdiff
io.backend.unix: hints on M\ fd refill
authorJoe Groff <arcata@gmail.com>
Wed, 9 Nov 2011 23:38:03 +0000 (15:38 -0800)
committerJoe Groff <arcata@gmail.com>
Thu, 10 Nov 2011 00:32:47 +0000 (16:32 -0800)
Trims some low-order dispatch overhead for #376.

basis/io/backend/unix/unix.factor

index 9f5c4328d89bc53abd9f0ccd087441e0baf6c2df..dc5da7e560a2d8d13430955418caea2f9d46a080 100755 (executable)
@@ -7,7 +7,7 @@ io.encodings math.parser continuations system libc namespaces
 make io.timeouts io.encodings.utf8 destructors
 destructors.private accessors summary combinators locals
 unix.time unix.types fry io.backend.unix.multiplexers
-classes.struct ;
+classes.struct hints ;
 QUALIFIED: io
 IN: io.backend.unix
 
@@ -107,6 +107,9 @@ M: fd refill
         [ (io-error) ]
     } cond ;
 
+HINTS: M\ fd refill
+    { buffered-port fd } ;
+
 M: unix (wait-to-read) ( port -- )
     dup
     dup handle>> dup check-disposed refill dup