---
tags: Research
---
# 研究相關資料
## 實驗不同 Dispatch 機制
### Tail Call Optimization
* [wasm3](https://github.com/wasm3/wasm3) - a high performance WebAssembly interpreter with TCO
* [Building the fastest Lua interpreter.. automatically! ](https://sillycross.github.io/2022/11/22/2022-11-22/)
* [Parsing Protobuf at 2+GB/s: How I Learned To Love Tail Calls in C](https://blog.reverberate.org/2021/04/21/musttail-efficient-interpreters.html)
* [Re: Suggestions on implementing an efficient instruction set simulator in LuaJIT2](http://lua-users.org/lists/lua-l/2011-02/msg00742.html)
### Code-copying
* [Optimizing software-hardware interplay in efficient virtual machines](https://citeseerx.ist.psu.edu/document?repid=rep1&type=pdf&doi=3d67e38d8b75523e1e32afb4b36dd1dd440f0335)
* [interp]() - Testing interpreter dispatch methods
* Switching
* Direct Threaded Code (DTC)
* Indirect Threaded Code (ITC)
* Tail-Calls
* code-copying
* [Jamvm](https://github.com/cfriedt/jamvm) - open-source Java Virtual Machine
* Switching
* Direct Threaded Code (DTC)
* Indirect Threaded Code (ITC)
* code-copying
* [interpreters-comparison](https://github.com/grigory-rechistov/interpreters-comparison)
* [Thesis - Optimizing direct threaded code by selective inlining](https://groups.csail.mit.edu/pag/OLD/parg/piumarta98optimizing.pdf)
## Adaptive Replacement Cache 加強 basic block 的記憶體管理
Adaptive Replacement Cache (ARC) is a page replacement algorithm with better performance than least recently used (LRU). Better memory usage and hit rates can be achieved after the translated blocks are handled by ARC by keeping track of frequently used and recently used pages as well as a recent eviction history for both.
* [ZFS Caching](https://papers.freebsd.org/2019/FOSDEM/jude-eli5_zfs_caching.files/ELI5_ZFS_ARC.pdf)
* [ARC cache 實作](https://github.com/Xiaoccer/ARC_Cache)
* [Adaptive Replacement Cache(ARC) 快取置換演算法](https://zhuanlan.zhihu.com/p/522306900)
* [memory pool 實作](https://github.com/cubicdaiya/mpool)
* [Benchmarking Malloc with Doom 3](https://www.forrestthewoods.com/blog/benchmarking-malloc-with-doom3/) - 在 runtime 頻繁執行 malloc 可能對效能造成影響。
## Compiler 書籍及相關文件
* Engineering a Compiler - 3rd Edition
* Scanners
* DFA, NFA
* Regular Expresison
* Intermediate Representation
* Graphic IR
* Linear IR
* Static Single Assignment
* [Symbol table](https://iq.opengenus.org/symbol-table-in-compiler/)
* [ControlFlowGraphs](https://groups.seas.harvard.edu/courses/cs153/2018fa/lectures/Lec17-CFG-dataflow.pdf)
## 類似專案
* [rvemu](https://github.com/ksco/rvemu) - a fast Linux emulator, which can run statically linked RV64 programs,整合 JIT 以及 clang
* [mini-rv32ima](https://github.com/cnlohr/mini-rv32ima) - 該專案有實作 peripheral,可以跑 linux
## 研討會
* [Embedded Linux Conference + Zephyr Developer Summit + Embedded IoT Summit + Safety-critical Software Summit](https://events.linuxfoundation.org/embedded-open-source-summit/program/cfp/)
* [Open Source Summit North America + LinuxCon + Critical Software Summit](https://events.linuxfoundation.org/open-source-summit-north-america/program/cfp/)
* [Table-Driven Scanners](https://dafuqis-that.com/2017/09/19/compiler-series-scanner-implementation/)