Skip to content

Instantly share code, notes, and snippets.

View omar391's full-sized avatar
๐Ÿ‘‹
Hi! Nice to meet you! #humble human, #love-2-architect-systems

Omar omar391

๐Ÿ‘‹
Hi! Nice to meet you! #humble human, #love-2-architect-systems
View GitHub Profile
@omar391
omar391 / mcp_bench.sh
Created May 6, 2026 16:31
Node vs Bun Cold Start Benchmark
#!/bin/bash
cat << 'EOF' > server.cjs
const http = require('http');
const server = http.createServer((req, res) => res.end('ok'));
server.listen(3000, () => process.exit(0));
EOF
cat << 'EOF' > bun_server.js
const server = Bun.serve({
@omar391
omar391 / bench_test.go
Created May 6, 2026 16:29
Go Channel vs Ring Buffer Benchmark
package bench
import (
"sync"
"sync/atomic"
"testing"
)
type RingBuffer struct {
head uint64
@omar391
omar391 / actor_test.go
Created May 6, 2026 16:28
Rust vs Go Actor Ping-Pong Benchmark
package bench
import "testing"
func BenchmarkPingPong(b *testing.B) {
ch1 := make(chan struct{})
ch2 := make(chan struct{})
go func() {
for {
<-ch1
@omar391
omar391 / tuneR_bench.R
Created May 6, 2026 16:27
tuneR Grid vs Random Search Mock Benchmark
# Mocking a hyperparameter tuning process
simulate_model_eval <- function(params) {
# Simulate evaluation time (e.g., matrix multiplication)
mat <- matrix(rnorm(100 * 100), nrow = 100)
res <- solve(mat %*% t(mat) + diag(100))
# Return dummy accuracy
return(runif(1, 0.8, 0.95))
}