Green Code Experiments
summary
Small benchmark programs measure runtime as a proxy for energy and money using repeated runs, shuffled ordering, and simple timers; code is generated or assisted by an LLM and results are published. A loop test shows Python is faster when initialization is moved outside the loop but C and Java are slightly faster when initialized inside. Date parsing on a MacBook finds DateTime.Parse fastest on macbook benchmark, ParseExact slower, DateTimeOffset slowest. A language ranking reproduces that compiled languages dominate and interpreted languages are ~70–80× slower than C, and a regex test shows C ≈5× faster than Perl for that workload.
AI-written summary · about
chapters (11)
- 0:00Green code experiments matter
- 1:08Measuring energy cost indirectly
- 3:19Optimizing code without experiments
- 3:59Loop variable speed test
- 5:26Generalizing experimental method
- 6:08Date parsing efficiency
- 7:56LLM tools for experiments
- 8:18Questions experiments answer
- 9:02Rust in WebAssembly impact
- 11:58Regex performance C vs Perl
- 13:01Code optimization context
related talks
37mRock Your Code Code and App Performance for Microsoft .Net
01h 00m“Want fast C++? Know your hardware!"
01h 00mRock Your Code: Code & App Performance for Microsoft .NET
47mBenchmarking C++, From video games to algorithmic trading
42mIntuition vs. Reality: Surprising Truths in Python Performance
01h 38mKeynote: Benchmarking - It's About Time
18mJavaScript on the Desktop, Fast and Slow
28mWhy Python Loops Are "Slow": A Gentle Introduction to Interpretation, Bytecode, and Fast Code
