GraphQL-Houtou
view release on metacpan or search on metacpan
docs/execution-benchmark.md view on Meta::CPAN
# Execution Benchmark
## Purpose
å®è¡ç³»ã®ä¸»ç³»ã runtime / VM / native bundle ã«ç§»ã£ãããã
execution benchmark ã®è©ä¾¡è»¸ãããã«åãããã
ãã® benchmark ãè¦ããã®ã¯æ¬¡ã® 2 系統ã§ãã
- `cached runtime (perl)`
- èµ·åæã« runtime 㨠program ã compile ããå¾ãPerl VM ã§å®è¡ãã
- `cached native bundle`
- èµ·åæã« native runtime / native bundle ã¾ã§ compile ããå¾ãnative VM ãå®è¡ãã
éè¦ãªã®ã¯ãresolver ã®æ»ãå¤ãã®ãã®ã§ã¯ãªã **å®è¡è¨ç»ã®åå©ç¨** ãæ¸¬ããã¨ã§ãã
ãã®ããæ§ execution mainline ã®æ¯è¼ã¯ä¸»ç³»ããå¤ãã¾ããã
## Drivers
- `util/execution-benchmark.pl`
- `util/execution-benchmark-checkpoint.pl`
- `util/profile-execution-target.pl`
## Measurement Setup
å
¸åçãªä½¿ãæ¹:
```sh
perl util/execution-benchmark.pl --count=-3
# checkpoint åãã®ç¹°ãè¿ãå®è¡
perl util/execution-benchmark-checkpoint.pl --repeat=5 --count=-3
```
åç¬ target ã® profiling / å®è¡ç¢ºèª:
```sh
perl util/profile-execution-target.pl \
--case nested_variable_object \
--target houtou_runtime_cached_perl \
--iterations 300
perl util/profile-execution-target.pl \
--case nested_variable_object \
--target houtou_runtime_native_bundle \
--iterations 300
```
## Compared Targets
ç¾å¨ã® benchmark script ãæ¯è¼ãã target ã¯æ¬¡ã§ãã
- `upstream_string`
- `upstream_ast`
- `houtou_runtime_cached_perl`
- `houtou_runtime_native_bundle`
promise case ã§ã¯ native bundle ã使ãããPerl runtime ãæ¯è¼å¯¾è±¡ã«æ®ãã¾ãã
## Notes
- benchmark script 㯠repo checkout ã® `lib/` ãåªå
ããå¿
è¦ãªã `blib/arch` ã® XS ãä½µç¨ãã¾ãã
- native benchmark ãåãåã«ã¯ãrepo root ã® `./Build build` ã§ local XS artifact ãæ´æ°ãã¦ãã ããã
- ãããå¿ããã¨ãPerl å´ lowering ã¯ææ°ã§ã native bundle å®è¡ã ãå¤ã XS ãèªãããã
`__typename` ã slot index ã® mismatch ã benchmark failure ã¨ãã¦èª¤æ¤åºãã¾ãã
- `util/execution-benchmark-checkpoint.pl` ã®æ¢å® mode ã
- `houtou_runtime_cached_perl`
- `houtou_runtime_native_bundle`
ã«åãæ¿ãã£ã¦ãã¾ãã
## Interpretation
ãã¾éè¦ããã®ã¯ micro-opt ã®ä¸ä¸ã§ã¯ãªããæ¬¡ã® 3 ç¹ã§ãã
1. cached runtime ã upstream ãå®å®ãã¦ä¸åãã
2. cached native bundle ã cached runtime ããåååã«åºãã
3. nested / list / abstract ã® 3 ç³»çµ±ã§æ¥µç«¯ãª regress ããªãã
ã¤ã¾ããè©ä¾¡å¯¾è±¡ã¯
**ãæ§ executor ããä½ % éãããã§ã¯ãªããruntime ã® control plane 㨠native data plane ã®åé¢ãå®å©ãçãã§ããã**
ã§ãã
( run in 1.215 second using v1.01-cache-2.11-cpan-4ab04211f4c )