Skip to content
Snippets Groups Projects
Verified Commit bd350f28 authored by orestis.malaspin's avatar orestis.malaspin
Browse files

updated makefile for complexity and slide. need to add a proper discussion of...

updated makefile for complexity and slide. need to add a proper discussion of the topic and 1-2 examples like searching in a list
parent f8722d81
No related branches found
No related tags found
No related merge requests found
Pipeline #14781 passed
......@@ -32,17 +32,21 @@ printf("computation about %.5f seconds\n",
```bash
source_codes/complexity$ make bench
RUN ONCE O0
the computation of 199972.740622 took about 0.00836 seconds
RUN ONCE O3
the computation of 199972.740622 took about 0.00203 seconds
RUN THOUSAND TIMES O0
the computation of 199972740.621922 took about 0.00363 seconds
RUN THOUSAND TIMES O3
the computation of 199972740.621922 took about 0.00046 seconds
RUN ONCE -O0
the computation took about 0.00836 seconds
RUN ONCE -O3
the computation took about 0.00203 seconds
RUN THOUSAND TIMES -O0
the computation took about 0.00363 seconds
RUN THOUSAND TIMES -O3
the computation took about 0.00046 seconds
```
Et sur votre machine les résultats seront **différents**.
. . .
* Il est nécessaire d'avoir une mesure indépendante du
matériel/compilateur/façon de mesurer.
## Conclusion
* Nécessité d'avoir une mesure indépendante du/de la
matériel/compilateur/façon de mesurer/météo.
......@@ -12,10 +12,10 @@ $(EXECS): %: %.c
@echo $@ >> .gitignore
bench: sum_one sum_one_opt sum_thousand sum_thousand_opt
@echo "RUN ONCE O0" && ./sum_one
@echo "RUN ONCE O3" && ./sum_one_opt
@echo "RUN THOUSAND TIMES O0" && ./sum_thousand
@echo "RUN THOUSAND TIMES O3" && ./sum_thousand_opt
@echo "RUN ONCE -O0" && ./sum_one
@echo "RUN ONCE -O3" && ./sum_one_opt
@echo "RUN THOUSAND TIMES -O0" && ./sum_thousand
@echo "RUN THOUSAND TIMES -O3" && ./sum_thousand_opt
sum_one: sum.c
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment