A collection of interactive Pluto.jl notebooks exploring performance optimization techniques across different programming languages.
| Notebook | Description |
|---|---|
| fast_to_upper.jl | Binary trickery for implementing a fast toupper using a single bit operation |
| faster_fibonacci.jl | Using semigroups and matrix exponentiation to compute Fibonacci numbers in O(log n) time |
| faster_lower_bound.jl | Optimizing Julia's searchsortedfirst (equivalent to C++'s lower_bound) |
| random_vs_randint.jl | Why Python's random.random() is 5x faster than random.randint() |
| sprintf_vs_to_chars.jl | Comparing sprintf vs std::to_chars for numeric-to-string conversion |
| virtual-functions-strike-again.jl | Virtual dispatch overhead and the -fstrict-vtable-pointers optimization |
-
Install Julia from julialang.org
-
Install Pluto.jl:
using Pkg Pkg.add("Pluto")
-
Launch Pluto and open any notebook:
using Pluto Pluto.run()
-
Navigate to a notebook file (e.g.,
faster_fibonacci.jl) to view and interact with it.
MIT License - see LICENSE for details.