From ed749ed4553ac266fa8fdaf7d758f577563fd393 Mon Sep 17 00:00:00 2001 From: Igor Pashev Date: Mon, 17 Oct 2022 17:15:03 +0200 Subject: Add nuitka --- Makefile | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index c2abbd8..1bc79ff 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,8 @@ BINARIES := \ mendeleev-c \ mendeleev-c-cpp \ mendeleev-f \ - mendeleev-hs + mendeleev-hs \ + mendeleev-py \ SCRIPTS := \ python2:mendeleev.py \ @@ -50,12 +51,6 @@ prof: \ GMON_OUT_PREFIX=$<-gmon ./$< $(PROF_TEST) > /dev/null $(MV) $<-gmon.* $@ -prof-mendeleev-py.dat: mendeleev.py - python3 -m cProfile -o $@ $< $(PROF_TEST) > /dev/null - -prof-mendeleev-py.txt: prof-mendeleev-py.dat - python3 -c 'import pstats; pstats.Stats("$<").sort_stats("tottime").print_stats()' > $@ - # C CC = gcc @@ -106,3 +101,17 @@ prof-mendeleev-hs.txt: prof-mendeleev-hs ./$< +RTS -p -RTS $(PROF_TEST) > /dev/null $(MV) $<.prof $@ +# Python +NUITKA = nuitka3 +NUITKA_FLAGS = --quiet --remove-output --follow-imports +mendeleev-py: mendeleev.py + $(NUITKA) $(NUITKA_FLAGS) $< -o $@ + +prof-mendeleev-py.dat: mendeleev.py + python3 -m cProfile -o $@ $< $(PROF_TEST) > /dev/null + +prof-mendeleev-py.txt: prof-mendeleev-py.dat + python3 -c 'import pstats; pstats.Stats("$<").sort_stats("tottime").print_stats()' > $@ + + + -- cgit v1.2.3