]> gitweb.factorcode.org Git - factor.git/commitdiff
simple-flat-file: 1.3s -> 300ms for parsing the unicode txt file.
authorDoug Coleman <doug.coleman@gmail.com>
Sun, 7 Jul 2019 16:01:41 +0000 (11:01 -0500)
committerDoug Coleman <doug.coleman@gmail.com>
Sun, 7 Jul 2019 16:01:41 +0000 (11:01 -0500)
Somehow it's spending a ton of time in <string> if split-; is not inlined.

basis/simple-flat-file/simple-flat-file.factor

index 4fb68e2cf90a9365f624232527a674c35673d085..6e3cd4edfa5e5f1c0942ccebbd127e4600c77a77 100644 (file)
@@ -30,7 +30,7 @@ IN: simple-flat-file
     utf8 file-lines process-codetable-lines >biassoc ;
 
 : split-; ( line -- array )
-    ";" split [ [ blank? ] trim ] map! ;
+    ";" split [ [ blank? ] trim ] map! ; inline
 
 : load-data-file ( filename -- data )
     utf8 file-lines drop-comments [ split-; ] map! ;