# Fractional Indexing ## Metadata **Status**:: #x **Zettel**:: #zettel/fleeting **Created**:: [[2026-06-22]] **Parent**:: [[♯ Kleppmann - Designing data-intensive applications]] **Children**:: [[Evan Wallace - Realtime Editing of Ordered Sequences (Highlights)]], [[David Greenspan - Implementing Fractional Indexing (Highlights)]] ## Synopsis Use the real number to index the item position. Average the two ends when inserting a new item between the two existing items. Ensure the position number is between 0 and 1 exclusively, because it will simplify inserting an item before or after the list. ## Implementation - Extract common prefix. Note to append tailing 0's to the common prefix. - Use sentinel for END - Can be extended to higher base to utilize the range of ASCII code. ### Logarithmic length increase - Add integer part and encode the integer part to ensure the lexical order is identical to the numeric order. - Fixed length encoding - Length prefixed encoding: A0~A9, B00~B99.