Add a deploy test to keep benchmark.regex-dna size down
parent
d60e586f48
commit
1d45720579
|
@ -26,6 +26,8 @@ os macosx? [
|
||||||
[ t ] [ "webkit-demo" shake-and-bake 500000 small-enough? ] unit-test
|
[ t ] [ "webkit-demo" shake-and-bake 500000 small-enough? ] unit-test
|
||||||
] when
|
] when
|
||||||
|
|
||||||
|
[ t ] [ "benchmark.regex-dna" shake-and-bake 1200000 small-enough? ] unit-test
|
||||||
|
|
||||||
{
|
{
|
||||||
"tools.deploy.test.1"
|
"tools.deploy.test.1"
|
||||||
"tools.deploy.test.2"
|
"tools.deploy.test.2"
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
! Copyright (C) 2008 Slava Pestov.
|
! Copyright (C) 2008, 2009 Slava Pestov.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: accessors prettyprint io io.encodings.ascii
|
USING: accessors io io.encodings.ascii io.files kernel sequences
|
||||||
io.files kernel sequences assocs namespaces regexp ;
|
assocs math.parser namespaces regexp ;
|
||||||
IN: benchmark.regex-dna
|
IN: benchmark.regex-dna
|
||||||
|
|
||||||
! Based on http://shootout.alioth.debian.org/gp4/benchmark.php?test=regexdna&lang=ruby&id=1
|
! Based on http://shootout.alioth.debian.org/gp4/benchmark.php?test=regexdna&lang=ruby&id=1
|
||||||
|
@ -22,7 +22,7 @@ IN: benchmark.regex-dna
|
||||||
R/ agggtaa[cgt]|[acg]ttaccct/i
|
R/ agggtaa[cgt]|[acg]ttaccct/i
|
||||||
} [
|
} [
|
||||||
[ raw>> write bl ]
|
[ raw>> write bl ]
|
||||||
[ count-matches . ]
|
[ count-matches number>string print ]
|
||||||
bi
|
bi
|
||||||
] with each ;
|
] with each ;
|
||||||
|
|
||||||
|
@ -50,9 +50,9 @@ SYMBOL: clen
|
||||||
dup count-patterns
|
dup count-patterns
|
||||||
do-replacements
|
do-replacements
|
||||||
nl
|
nl
|
||||||
ilen get .
|
ilen get number>string print
|
||||||
clen get .
|
clen get number>string print
|
||||||
length . ;
|
length number>string print ;
|
||||||
|
|
||||||
: regex-dna-main ( -- )
|
: regex-dna-main ( -- )
|
||||||
"resource:extra/benchmark/regex-dna/regex-dna-test-in.txt" regex-dna ;
|
"resource:extra/benchmark/regex-dna/regex-dna-test-in.txt" regex-dna ;
|
||||||
|
|
Loading…
Reference in New Issue