mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2025-12-26 08:50:10 +01:00
Hook into the scanner to write out binary version of the tokenized
objects -- note we bind executable names (i.e. check to see if is an
operator and substitute the name with an operator -- this breaks
overloading of operators by scripts).
By converting scripts to a binary form, they are more compact and
execute faster:
firefox-world-map.trace 526850146 bytes
bound.trace 275187755 bytes
[ # ] backend test min(s) median(s) stddev. count
[ 0] null bound 34.481 34.741 0.68% 3/3
[ 1] null firefox-world-map 89.635 89.716 0.19% 3/3
[ 0] drm bound 79.304 79.350 0.61% 3/3
[ 1] drm firefox-world-map 135.380 135.475 0.58% 3/3
[ 0] image bound 95.819 96.258 2.85% 3/3
[ 1] image firefox-world-map 156.889 156.935 1.36% 3/3
[ 0] xlib bound 539.130 550.220 1.40% 3/3
[ 1] xlib firefox-world-map 596.244 613.487 1.74% 3/3
This trace has a lot of complex paths and the use of binary floating point
reduces the file size by about 50%, with a commensurate reduction in scan
time and significant reduction in operator lookup overhead. Note that this
test is still IO/CPU bound on my i915 with its pitifully slow flash...
|
||
|---|---|---|
| .. | ||
| examples | ||
| .gitignore | ||
| cairo-script-file.c | ||
| cairo-script-hash.c | ||
| cairo-script-interpreter.c | ||
| cairo-script-interpreter.h | ||
| cairo-script-objects.c | ||
| cairo-script-operators.c | ||
| cairo-script-private.h | ||
| cairo-script-scanner.c | ||
| cairo-script-stack.c | ||
| COPYING | ||
| csi-exec.c | ||
| csi-replay.c | ||
| Makefile.am | ||