Add optimization to the Universal Machine interpreter

This commit is contained in:
Dimitri Lozeve 2021-01-12 08:22:52 +01:00
parent 9d8f825811
commit 9376de6140
2 changed files with 10 additions and 1 deletions

View file

@ -1,5 +1,5 @@
CC = gcc
CFLAGS = -Wall -Werror -pedantic -g
CFLAGS = -Wall -Werror -pedantic -O3
.PHONY: all
all: um

View file

@ -14,6 +14,15 @@ and run it on a UM program:
./um codex.umz
#+end_src
Benchmark times:
#+begin_src sh
# time ./um sandmark.umz
# without optimization
./um sandmark.umz 86.20s user 0.00s system 99% cpu 1:26.20 total
# with -O3
./um sandmark.umz 30.06s user 0.00s system 99% cpu 30.065 total
#+end_src
Get the next program:
#+begin_src sh