From 5778d1e38db5efde1092147ef877e95f8ebb630f Mon Sep 17 00:00:00 2001 From: ValKmjolnir Date: Mon, 24 Jan 2022 15:19:27 +0800 Subject: [PATCH] update new test data --- README.md | 19 +++++++++++++++++++ module/makefile | 3 +++ test/module_test.nas | 2 +- 3 files changed, 23 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 8ec7c89..ce77f64 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,7 @@ * [Benchmark](#benchmark) * [v6.5 (i5-8250U windows 10)](#version-65-i5-8250u-windows10-2021619) * [v6.5 (i5-8250U ubuntu-WSL)](#version-70-i5-8250u-ubuntu-wsl-on-windows10-2021629) + * [v8.0 (R9-5900HX ubuntu-WSL)](#version-80-r9-5900hx-ubuntu-wsl-2022123) * [Tutorial](#simple-tutorial) * [basic value type](#basic-value-type) * [operators](#operators) @@ -631,6 +632,24 @@ running time: |quick_sort.nas|0s|great improvement| |bfs.nas|0.0156s|great improvement| +### Version 8.0 (R9-5900HX ubuntu-WSL 2022/1/23) + +running time: + +|file|total time|info| +|:----|:----|:----| +|bf.nas|1100.19s|| +|mandel.nas|28.98s|| +|life.nas|0.857s(windows) 0.56(ubuntu WSL)|| +|fib.nas|0.28s|| +|bfs.nas|0.156s|changed test file| +|pi.nas|0.0625s|| +|bigloop.nas|0.047s|| +|calc.nas|0.03125s|changed test file| +|mandelbrot.nas|0.0156s|| +|ascii-art.nas|0s|| +|quick_sort.nas|0s|| + ## Simple Tutorial Nasal is really easy to learn. diff --git a/module/makefile b/module/makefile index 7190e7f..d1c545b 100644 --- a/module/makefile +++ b/module/makefile @@ -2,5 +2,8 @@ libfib.so: fib.cpp clang++ -c -O3 fib.cpp -fPIC -o fib.o clang++ -shared -o libfib.so fib.o +libfib.dll: fib.cpp + g++ -c -O3 fib.cpp -fPIC -o fib.o + g++ -shared -o libfib.dll fib.o clean: rm *.o *.so *.dll *.dylib \ No newline at end of file diff --git a/test/module_test.nas b/test/module_test.nas index 224f4b3..b3502a5 100644 --- a/test/module_test.nas +++ b/test/module_test.nas @@ -1,7 +1,7 @@ import("lib.nas"); var libfib=func(){ - var dl=dylib.dlopen("./module/libfib.so"); + var dl=dylib.dlopen("./module/libfib."~(os.platform()=="windows"?"dll":"so")); var fib=dylib.dlsym(dl,"fib"); var qfib=dylib.dlsym(dl,"quick_fib"); var call=dylib.dlcall;