Speculative Branches
open-menu closeme
Home
Categories
Tags
About
github twitter linkedin email rss
  • 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
  • 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
  • The Most Useful Statistical Test You Didn't Learn in School

    calendar Jul 4, 2022 · 9 min read · Performance Mathematical Algorithms  ·
    Share on: twitter facebook linkedin copy

    In performance work, you will often find many distributions that are weirdly shaped: fat-tailed distributions, distributions with a hard lower bound at a non-zero number, and distributions that are just plain odd. Particularly when you look at latency distributions, it is extremely common for the 99th percentile to be …


    Read More
  • Fixed Point Arithmetic

    calendar May 18, 2022 · 12 min read · Mathematical Algorithms Performance  ·
    Share on: twitter facebook linkedin copy

    When we think of how to represent fractional numbers in code, we reach for double and float, and almost never reach for anything else. There are several alternatives, including constructive real numbers that are used in calculators, and rational numbers. One alternative predates all of these, including floating point, …


    Read More
  • You (Probably) Shouldn't use a Lookup Table

    calendar May 4, 2022 · 19 min read · Performance  ·
    Share on: twitter facebook linkedin copy

    I have been working on another post recently, also related to division, but I wanted to address a comment I got from several people on the previous division article. This comment invariably follows a lot of articles on using math to do things with chars and shorts. It is: "why are you doing all of this when you can …


    Read More
  • Racing the Hardware: 8-bit Division

    calendar Feb 22, 2022 · 19 min read · Mathematical Algorithms Division Performance  ·
    Share on: twitter facebook linkedin copy

    Occasionally, I like to peruse uops.info. It is a great resource for micro-optimization: benchmark every x86 instruction on every architecture, and compile the results. Every time I look at this table, there is one thing that sticks out to me: the DIV instruction. On a Coffee Lake CPU, an 8-bit DIV takes a long time: …


    Read More
  • The Meaning of Speed

    calendar Feb 13, 2022 · 11 min read · Performance  ·
    Share on: twitter facebook linkedin copy

    A lot of the time, when engineers think of performance work, we think about looking at benchmarks and making the numbers smaller. We anticipate that we are benchmarking the right pieces of code, and we take it for granted that reducing some of those numbers is a benefit, but also "the root of all evil" if done …


    Read More
  • Performance Numbers Worth Knowing

    calendar Jan 31, 2022 · 4 min read · Performance  ·
    Share on: twitter facebook linkedin copy

    When you design software to achieve a particular level of performance, it can be a good idea to be familiar with the general speed regimes you are working with: fundamental limitations like storage devices and networks can drive software architecture. Here are a set of common benchmark numbers that can help you anchor …


    Read More

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