Skip to content

pjullrich/peterandcode

Back Add Port (stdin/stdout pipe) and ETS ordered_set sorting approaches

Commit details

Add Port (stdin/stdout pipe) and ETS ordered_set sorting approaches

Description

Port sort: a standalone Rust binary that reads packed i64s from stdin, sorts with sort_unstable, and writes to stdout. Uses {:packet, 4} framing. Copy cost is kernel pipe I/O — between NIF and C Node. ETS ordered_set: inserts 1M elements into an AVL tree (ETS ordered_set), then extracts with tab2list. Fundamentally different from comparison sorts — builds a balanced search tree. Uses {value, index} tuples to preserve duplicates. https://claude.ai/code/session_011hHr17m5LkPkM75FU47Hxj

Metadata

Author
Claude noreply@anthropic.com
Committed
Commit

Contributors

  • Claude noreply@anthropic.com Author