HomeAboutRSSSubscribe

Phil Sun

Algorithms + Hardware

  • May 18 2023
    The most memorable math problem I've ever done

    A decade later, one problem and its solution still haunt me…

  • Oct 22 2021
    A mathematical analysis of Squid Game, game 5

    A spoiler-free look at your probability of death if you were forced to play a mathematically idealized version of the game from the hit K-drama series.

  • Aug 19 2020
    Silicon of the 2010s: a retrospective

    The big events and trends in hardware from the past decade.

  • Jan 19 2020
    Binary search takes O(∛n) time; geometric bounds in computation

    Memory’s slow, but how do we model it?

  • Aug 19 2019
    (Finished) Sunrise Alarm

    It can get really bright.

  • Jul 17 2019
    My DIY Sunrise Alarm Clock

    Why and how I wrote an Android app and wired up some hardware to simulate the sunrise

  • Feb 15 2019
    Turn Gmail attachments to Google Docs to save space

    Google Docs files don’t count against your Google storage quota, while Gmail attachments and all other file formats do. So, I made a tool to take attachments, import them as Google Docs, and replace the original attachment with links to the imported file

  • Jan 6 2019
    When typing, your fingers are like a superscalar processor

    Sometimes bad analogies are the most interesting ones because they make you really think about the two things you’re comparing. So here’s one such analogy that made me think more about CPU microarchitecture.

  • Nov 20 2018
    FFT-Based Integer Multiplication, Part 2

    How the Schonhage-Strassen algorithm uses the number theoretic transform (NTT) to multiply N-bit integers in O(N log N log log N) time

  • Oct 19 2018
    FFT-Based Integer Multiplication, Part 1

    The fast Fourier transform allows us to convolve in n log n time, which is useful for fast multiplication. But the FFT uses floating-point calculations; what problems does this cause when we want exact integer results?

Older Posts→

© Copyright 2023 Phil Sun