Speculative Branches
open-menu closeme
Home
Categories
Tags
About
github twitter linkedin email rss
  • Perfect Random Floating-Point Numbers

    calendar May 3, 2025 · 16 min read · Mathematical Algorithms  ·
    Share on: twitter facebook linkedin copy

    When I recently looked at the state of the art in floating point random number generation, I was surprised to see a common procedure in many programming languages and libraries that is not really a floating-point algorithm: Generate a random integer with bits chosen based on the precision of the format. Convert to …


    Read More
  • A Cryptographically Secret Santa

    calendar Dec 25, 2024 · 10 min read · Mathematical Algorithms  ·
    Share on: twitter facebook linkedin copy

    Twas about 4-6 weeks before Christmas, and all through the math department, not a creature was stirring, not even a plucky young undergrad. Cryptography professors Alice and Bob sat at the elliptically-curved conference table to plan the department's secret Santa. Mallory, the department secretary, had been given the …


    Read More
  • Time Programming for Lawyers and Jurors

    calendar Jun 26, 2024 · 9 min read · Software Engineering  ·
    Share on: twitter facebook linkedin copy

    I often like to have streams of trials playing in the background when I am working, and the recent trial of interest was the trial of Karen Read, who was accused of murder. One issue in this case was a conflict between two timestamps logged by different apps on a potential suspect's phone. Apple health had logged the …


    Read More
  • Five Nine Problems

    calendar Jun 13, 2024 · 14 min read · Software Engineering  ·
    Share on: twitter facebook linkedin copy

    A guilty pleasure of mine is the pursuit of perfection. It is certainly a vice in most contexts, but there are some problems whose solutions demand a measure of perfection. These are problems that I will refer to as "5-9 problems": problems whose solutions need five 9's (or more) in some dimension. Usually, those nines …


    Read More
  • The Computer Architecture of AI (in 2024)

    calendar Feb 10, 2024 · 16 min read · Performance Mathematical Algorithms  ·
    Share on: twitter facebook linkedin copy

    Over the last year, as a person with a hardware background, I have heard a lot of complaints about Nvidia's dominance of the machine learning market and whether I can build chips to make the situation better. While the amount of money I would expect it to take is less than $7 trillion, hardware accelerating this wave …


    Read More
  • The Knight Capital Disaster

    calendar Nov 22, 2023 · 9 min read · Software Engineering  ·
    Share on: twitter facebook linkedin copy

    This account comes from several publicly available sources as well as accounts from insiders who worked at Knight Capital Group at the time of the issue. I am telling it second- or third-hand. On August 1, 2012, Knight Capital fell on its sword. It experienced a software glitch that literally bankrupted the company. …


    Read More
  • Abstraction is Expensive

    calendar Dec 7, 2022 · 10 min read · Software Engineering  ·
    Share on: twitter facebook linkedin copy

    As you build a computer system, little things start to show up: maybe that database query is awkward for the feature you are building, or you find your server getting bogged down transferring gigabytes of data in hexadecimal ASCII, or your app translates itself to Japanese on the fly for hundreds of thousands of …


    Read More
  • Contemplating Randomness

    calendar Oct 27, 2022 · 8 min read  ·
    Share on: twitter facebook linkedin copy

    I have recently been immersed in the theory and practice of random number generation while working on Arbitrand, a new high-quality true random number generation service hosted in AWS. Because of that, I am starting a sequence of blog posts on randomness and random number generators. This post is the first of the …


    Read More
  • Introduction to Micro-Optimization

    calendar Sep 11, 2022 · 15 min read · Performance Software Engineering  ·
    Share on: twitter facebook linkedin copy

    A modern CPU is an incredible machine. It can execute many instructions at the same time, it can re-order instructions to ensure that memory accesses and dependency chains don't impact performance too much, it contains hundreds of registers, and it has huge areas of silicon devoted to predicting which branches your …


    Read More
  • Rest in Peace, Optane

    calendar Aug 12, 2022 · 10 min read  ·
    Share on: twitter facebook linkedin copy

    Intel's Optane memory modules launched with a lot of fanfare in 2015, and were recently discontinued, in 2022, with similar fanfare. It was a sad day for me, a lover of abstraction-breaking technologies, but it was forseeable and understandable. At the time of Optane's launch, a lot of us were excited about the idea of …


    Read More
    • ««
    • «
    • 1
    • 2
    • 3
    • »
    • »»

Nima Badizadegan

Computer systems engineer, performance expert, and applied mathematician in denial. Currently at Anthropic. All views are my own, and do not reflect the opinions of my employer.
Read More

Recent Posts

  • Perfect Random Floating-Point Numbers
  • A Cryptographically Secret Santa
  • Time Programming for Lawyers and Jurors
  • Five Nine Problems
  • The Computer Architecture of AI (in 2024)
  • The Knight Capital Disaster
  • Abstraction is Expensive
  • Contemplating Randomness

Categories

NUMERICAL LIBRARIES AND FUNCTIONS 4 RANDOM 4 ENGINEERING PRACTICES 3 FUNDAMENTALS OF PERFORMANCE 3 BREAKING THE CODING INTERVIEW 2 META POSTS 2 MICRO-OPTIMIZATION 2 RANDOMNESS 2 HISTORY 1

Tags

MATHEMATICAL ALGORITHMS 8 PERFORMANCE 8 SOFTWARE ENGINEERING 7 DIVISION 1

Copyright  NIMA BADIZADEGAN. All Rights Reserved

to-top