|
|
// work in progress
|
|
|
|
|
|
## Influence of ragel's code style outputs
|
|
|
# Influence of ragel's code style outputs
|
|
|
Choosing different code style for compiling to C code has in some cases significant influence:
|
|
|
|
|
|
![ragelcodestyles](/uploads/56ec0358eeb93af5a3bc677abc4918ea/ragelcodestyles.png)
|
|
|
|
|
|
More information on code styles in chapter 5.11 in ragel guide: https://www.colm.net/files/ragel/ragel-guide-6.9.pdf
|
|
|
|
|
|
## Source file compilation with gcc and clang
|
|
|
# Source file compilation with gcc and clang
|
|
|
|
|
|
Final time is average value of 10 compilations.
|
|
|
|
|
|
![20160718085659](/uploads/515307b69aecaf6a1d09b59452d9f087/20160718085659.png)
|
|
|
|
|
|
## Zscanner in use
|
|
|
|
|
|
On charts below you can see how code style, compiler and compiler options can influence time needed for zscanner to process zone file. To accomplish accurate measurement, all zone files were processed five times and average value is considered final output.
|
|
|
|
|
|
|
|
|
|
|
|
## Try it your self if you wish
|
|
|
|
|
|
|
|
|
# Zscanner in use
|
|
|
|
|
|
On charts below you can see how code style, compiler and compiler options can influence time needed for zscanner to process zone file. To accomplish accurate measurement, zscanner was tested 5 times on the sample zone file, and average value is final outcome of the test.
|
|
|
|
|
|
![20160719095252](/uploads/66fedfcb2198f9e4c02c2b21394aa5d5/20160719095252.png)
|
|
|
|
|
|
# Try it your self if you wish
|
|
|
## Required changes: ~/knot-dns/src/zscanner/ Makefile.am needs to be edited:
|
|
|
This section:
|
|
|
if FAST_PARSER
|
|
|
scanner.c: scanner.c.g2
|
|
|
cp $(srcdir)/$@.g2 $@
|
|
|
@echo "NOTE: Compilation of scanner.c can take several minutes!"
|
|
|
else
|
|
|
scanner.c: scanner.c.t0
|
|
|
cp $(srcdir)/$@.t0 $@
|
|
|
endif
|
|
|
for: scanner.c: scanner.c
|
|
|
## Unzip in ~/knot-dns/scripts/
|
|
|
[gcc-clang-tests.zip](/uploads/b7b8f4a951bf322c2157f588ea8386dc/gcc-clang-tests.zip)
|
|
|
## Used zone file
|
|
|
se.zone - 861,9 MB
|
|
|
https://zonedata.iis.se/
|
... | ... | |