Sitemap

A list of all the posts and pages found on the site. For you robots out there is an XML version available for digesting as well.

Pages

Posts

How to quickly factor out a constant factor from integers

29 minute read

Published:

This post revisits the topic of integer division, building upon the discussion in the previous post. Specifically, I’ll delve into removing trailing zeros in the decimal representation of an input integer, or more broadly, factoring out the highest power of a given constant that divides the input. This exploration stems from the problem of converting floating-point numbers into strings, where certain contemporary algorithms, such as Schubfach and Dragonbox, may yield outputs containing trailing zeros.

On the optimal bounds for integer division by constants

71 minute read

Published:

It is well-known that the integer division is quite a heavy operation on modern CPU’s - so slow, in fact, that it has even become a common wisdom to avoid doing it at ALL cost in performance-critical sections of a program. I do not know why division is particularly hard to optimize from the hardware perspective. I am just guessing, maybe (1) every general algorithm is essentially just a minor variation of the good-old long division, (2) which is almost impossible to parallelize. But whatever, that is not the topic of this post.

Faster integer formatting - James Anhalt (jeaiii)’s algorithm

29 minute read

Published:

This post is about an ingenious algorithm for printing integers into decimal strings. It sounds like an extremely simple problem, but it is in fact quite more complicated than one might imagine. Let us more precisely define what we want to do: we take an integer of specific bit-width and a byte buffer, and convert the input integer into a string consisting of its decimal digits, and then write it into the given buffer. For simplicity, we will assume that the integer is unsigned and is of $32$-bits. So, we want to implement the following function written in C++:

char* itoa(std::uint32_t n, char* buffer) {
  // Convert n into decimal digit string and write it into buffer.
  // Returns the position right next to the last character written.
}

There are numerous algorithms for doing this, and I will dig into a clever algorithm invented by James Anhalt (jeaiii), which seems to be the fastest known algorithm at the point of writing this post.

Continued fractions and their application into fast computation of \(\lfloor nx\rfloor\)

34 minute read

Published:

When I was working on Dragonbox and Grisu-Exact (which are float-to-string conversion algorithms with some nice properties) I had to come up with a fast method for computing things like $\lfloor n\log_{10}2 \rfloor$ or $\lfloor n\log_{2}10 \rfloor$, or more generally $\lfloor nx\rfloor$ for some integer $n$ and a fixed positive real number $x$. Actually, the sign of $x$ isn’t extremely important, but let us just assume $x>0$ for simplicity.

publications

A Generalized Typicality for Abstract Alphabets

Junekey Jeon. 2014. "A Generalized Typicality for Abstract Alphabets." 2014 IEEE International Symposium on Information Theory (ISIT), 2649-2653

A Bayesian sensor fusion scheme for attitude tracking

Junekey Jeon, Hwa-Suk Kim, Woo-Sug Jung and Sun-Joong Kim. 2017. "A Bayesian sensor fusion scheme for attitude tracking." 2017 19th International Conference on Advanced Communication Technology (ICACT)

Spectral clustering with brainstorming process for multi-view data

Jeong-Woo Son, Junekey Jeon, Alex Lee and Sun-Joong Kim. 2017. "Spectral clustering with brainstorming process for multi-view data." Proceedings of the AAAI Conference on Artificial Intelligence, 2548–2554

An Improved Regularity Criterion and Absence of Splash-like Singularities for g-SQG Patches

Junekey Jeon and Andrej Zlatoš. Anal. PDE (to appear)

On evolution of corner-like gSQG patches

Jeon, J., Jeong, IJ. On Evolution of Corner-Like gSQG Patches. J. Math. Fluid Mech. 25, 35 (2023)

talks

teaching

MATH 110. Introduction to Partial Differential Equations

Undergraduate course, University of California San Diego, 2019

MATH 140B. Foundations of Real Analysis II

Undergraduate course, University of California San Diego, 2020

MATH 140C. Foundations of Real Analysis III

Undergraduate course, University of California San Diego, 2020

MATH 144. Introduction to Fourier Analysis

Undergraduate course, University of California San Diego, 2020

MATH 20D. Introduction to Differential Equations

Undergraduate course, University of California San Diego, 2020

MATH 130. Differential Equations and Dynamical Systems

Undergraduate course, University of California San Diego, 2021

MATH 20D. Introduction to Differential Equations

Undergraduate course, University of California San Diego, 2021

MATH 142A. Introduction to Analysis I

Undergraduate course, University of California San Diego, 2021

MATH 20D. Introduction to Differential Equations

Undergraduate course, University of California San Diego, 2022

MATH 10B. Calculus II

Undergraduate course, University of California San Diego, 2022

MATH 144. Introduction to Fourier Analysis

Undergraduate course, University of California San Diego, 2022

MATH 140B. Foundations of Real Analysis II

Undergraduate course, University of California San Diego, 2023