# Sp.h standard library for C

11 Hacker News commenters recommended Sp.h standard library for C and 27 criticized it, November 2025 to November 2026. It was recommended in 1 of 13 months.

**Verdict:** A single-header-style C standard library replacement that people praise for its opinionated, self-contained design and portability, though critics find its implementation quality and performance uneven.

## Why people recommend it

- Opinionated, self-contained design praised (4 comments): "I love how hyper-opinionated this is." ([source](https://news.ycombinator.com/item?id=48244812)) "using sp.h as your base gives you that by default" ([source](https://news.ycombinator.com/item?id=48240705)) "since the library is factored with this in mind" ([source](https://news.ycombinator.com/item?id=48250724))

## What people warn about

- Header-only design slows compilation (4 comments): "It's a disadvantage, that it's header-only. It needs to include and a bunch of other stuff, which slow-downs compilation." ([source](https://news.ycombinator.com/item?id=48245143)) "Unfortunately though this particular header seems to include the system headers up in the declaration part of the header." ([source](https://news.ycombinator.com/item?id=48245585)) "The header includes the implementation too which will get compiled." ([source](https://news.ycombinator.com/item?id=48251912))
- Math and allocator implementations poor (4 comments): "the math functions are really bad implementations. The range reduction on the sin/cos functions are yikes-level." ([source](https://news.ycombinator.com/item?id=48244763)) "the default allocator uses mmap(2) for every single allocation, which is horribly inefficient" ([source](https://news.ycombinator.com/item?id=48244710)) "So every program using sp has to re-invent malloc or multiple copies of their own bespoke allocator" ([source](https://news.ycombinator.com/item?id=48249675))
- Portability claims overstated (4 comments): "Those are contradictory. Either the code is extremely portable, or it can't support "obscure" platforms, but not both." ([source](https://news.ycombinator.com/item?id=48244757)) ""extremely portable" is actually marketing for "It supports a number of platforms." ([source](https://news.ycombinator.com/item?id=48244785)) "It isn't a good fit for anything "exotic" like non-64-bit platforms." ([source](https://news.ycombinator.com/item?id=48252477))
- Inconsistent code quality overall (4 comments): "That seems to be a pretty consistent quality level for the entire library." ([source](https://news.ycombinator.com/item?id=48244736)) "Moreover, the quality of what's been added is significantly worse." ([source](https://news.ycombinator.com/item?id=48249372)) "I just wasted ten minutes of my life reviewing slop that I'm not going to get back." ([source](https://news.ycombinator.com/item?id=48245154))

## Alternatives hackers recommend

- [musl libc](https://hackerapproved.com/p/musl-libc.md): 34 recommend
- [glibc](https://hackerapproved.com/p/glibc.md): 29 recommend
- [Cosmopolitan libc](https://hackerapproved.com/p/cosmopolitan-libc.md): 29 recommend
- [GLib](https://hackerapproved.com/p/glib.md): 6 recommend
- [Lib0xc](https://hackerapproved.com/p/lib0xc.md): 6 recommend

## Cite as

Hacker Approved, "Sp.h standard library for C", https://hackerapproved.com/p/sp-h/ (counts from 1,795,640 Hacker News comments, November 2025 to November 2026).
