Benchmarking different ways to dispatch to a trait method, using static dispatch (compile time polymorphism), dynamic dispatch (runtime polymorphism) and dynamic dispatch backed by an arena allocator.
cargo.toml
[dependencies]
bumpalo = "3.13.0"
criterion = "0.5.1"
[[bench]]
name = "my_benchmark"
npm command | Yarn command | pnpm equivalent | bun equivalent |
---|---|---|---|
npm install | yarn | pnpm install | bun install |
npm install [pkg] | yarn add [pkg] | pnpm add [pkg] | bun add [pkg] |
npm uninstall [pkg] | yarn remove [pkg] | pnpm remove [pkg] | bun remove [pkg] |
npm update | yarn upgrade | pnpm update | bun update |
npm list | yarn list | pnpm list | ? |
npm run [scriptName] | yarn [scriptName] | pnpm [scriptName] | bun run [scriptName] |
npx [command] | yarn dlx [command] | pnpm dlx [command] | bunx [command] |
npm exec | yarn exec [c |
These have an interactive configuration similar to Vite, allowing you to select the framework (Vue, React, etc.)
https://vite-plugin-web-extension.aklinker1.io/
- Vite: with initializer
- Chrome and Firefox
- Newer, works nicely, dev loads extension into separate browser profile