Skip to content

ttsugriy/perf-bits

Repository files navigation

Perf Bits

A collection of interactive Pluto.jl notebooks exploring performance optimization techniques across different programming languages.

Notebooks

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

Requirements

Getting Started

  1. Install Julia from julialang.org

  2. Install Pluto.jl:

    using Pkg
    Pkg.add("Pluto")
  3. Launch Pluto and open any notebook:

    using Pluto
    Pluto.run()
  4. Navigate to a notebook file (e.g., faster_fibonacci.jl) to view and interact with it.

License

MIT License - see LICENSE for details.

About

Software performance articles.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages