bench_markdown: add a new engine, nitmd-o that is nitmd + optimisations
authorJean Privat <jean@pryen.org>
Tue, 31 Mar 2015 03:49:23 +0000 (10:49 +0700)
committerJean Privat <jean@pryen.org>
Tue, 31 Mar 2015 03:49:23 +0000 (10:49 +0700)
Signed-off-by: Jean Privat <jean@pryen.org>

benchmarks/markdown/bench_markdown.sh
benchmarks/markdown/engines/nitmd/Makefile

index 707dc99..be58d55 100755 (executable)
@@ -88,6 +88,18 @@ function bench_nitmd()
 }
 bench_nitmd
 
+function bench_nitmd-o()
+{
+       name="$FUNCNAME"
+       skip_test "$name" && return
+       prepare_res $outdir/nitmd-o.dat "nitmd-o" "nitmd-o"
+       for file in $bncdir/*.md; do
+               bench=`basename $file .md`
+               bench_command "$bench" "" "$engdir/nitmd/nitmd-o" "$file" "$s"
+       done
+}
+bench_nitmd-o
+
 function bench_txtmark()
 {
        name="$FUNCNAME"
index aa79fbc..6424382 100644 (file)
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+all: nitmd nitmd-o
+
 nitmd:
        nitc nitmd.nit
 
-test: nitmd
+nitmd-o:
+       nitc --semi-global nitmd.nit -o $@
+
+test: all
        ./nitmd ../../benches/hello.md 5
+       ./nitmd-o ../../benches/hello.md 5
 
 clean:
-       rm -rf nitmd
+       rm -rf nitmd nitmd-o