Sp.h standard library for C
Ranked 4 of 9 c++ libraries by recommenders
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.
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.
38 people gave an opinion
- recommend it
- 11
- criticize it
- 27
- approval share
- 29%
Recommended in 1 of 13 months
- November 2025: not recommended
- December 2025: not recommended
- January 2026: not recommended
- February 2026: not recommended
- March 2026: not recommended
- April 2026: not recommended
- May 2026: recommended
- June 2026: not recommended
- July 2026: not recommended
- August 2026: not recommended
- September 2026: not recommended
- October 2026: not recommended
- November 2026: not recommended (month in progress)
Why it doesn’t carry the badge
- 11 people recommend itNeeds 10 or more, met.
- 0.4 recommenders for every criticNeeds 2 to 1 or better, not met.
- Recommended in 1 of 13 monthsNeeds 4 or more, not met.
The same three rules apply to every product, and the badge can’t be bought. How the badge works
What people say about it
The reasons people give, with the number of comments that give each one. Open a reason to read what they said.
Why people recommend it
Each mark is one comment
Opinionated, self-contained design praised
“I love how hyper-opinionated this is.”
Comment from 23 May 2026 in “Sp.h is the standard library that C deserves” “using sp.h as your base gives you that by default”
Comment from 22 May 2026 in “Show HN: TC, A minimalistic systems language with 10 keywords (plus types)” “since the library is factored with this in mind”
Comment from 23 May 2026 in “Sp.h is the standard library that C deserves” - Comment from 23 May 2026 in “Sp.h is the standard library that C deserves”
What people warn about
Each mark is one comment
Header-only design slows compilation
“It's a disadvantage, that it's header-only. It needs to include and a bunch of other stuff, which slow-downs compilation.”
Comment from 23 May 2026 in “Sp.h is the standard library that C deserves” “Unfortunately though this particular header seems to include the system headers up in the declaration part of the header.”
Comment from 23 May 2026 in “Sp.h is the standard library that C deserves” “The header includes the implementation too which will get compiled.”
Comment from 23 May 2026 in “Sp.h is the standard library that C deserves” - Comment from 23 May 2026 in “Sp.h is the standard library that C deserves”
Math and allocator implementations poor
“the math functions are really bad implementations. The range reduction on the sin/cos functions are yikes-level.”
Comment from 23 May 2026 in “Sp.h is the standard library that C deserves” “the default allocator uses mmap(2) for every single allocation, which is horribly inefficient”
Comment from 23 May 2026 in “Sp.h is the standard library that C deserves” “So every program using sp has to re-invent malloc or multiple copies of their own bespoke allocator”
Comment from 23 May 2026 in “Sp.h is the standard library that C deserves” - Comment from 23 May 2026 in “Sp.h is the standard library that C deserves”
Portability claims overstated
“Those are contradictory. Either the code is extremely portable, or it can't support "obscure" platforms, but not both.”
Comment from 23 May 2026 in “Sp.h is the standard library that C deserves” “"extremely portable" is actually marketing for "It supports a number of platforms.”
Comment from 23 May 2026 in “Sp.h is the standard library that C deserves” “It isn't a good fit for anything "exotic" like non-64-bit platforms.”
Comment from 23 May 2026 in “Sp.h is the standard library that C deserves” - Comment from 23 May 2026 in “Sp.h is the standard library that C deserves”
Inconsistent code quality overall
“That seems to be a pretty consistent quality level for the entire library.”
Comment from 23 May 2026 in “Sp.h is the standard library that C deserves” “Moreover, the quality of what's been added is significantly worse.”
Comment from 23 May 2026 in “Sp.h is the standard library that C deserves” “I just wasted ten minutes of my life reviewing slop that I'm not going to get back.”
Comment from 23 May 2026 in “Sp.h is the standard library that C deserves” - Comment from 23 May 2026 in “Sp.h is the standard library that C deserves”
Other c++ libraries people recommend
The four most recommended other c++ libraries, with the same counts for each, so you can compare like for like. The tick on each bar marks the 2 to 1 line the badge needs.
| Product | Recommend | Criticize | Approval | Months | Owned | Badge |
|---|---|---|---|---|---|---|
| musl libc | 34 | 25 | 58% | 10 | — | — |
| glibc | 29 | 75 | 28% | 10 | — | — |
| Cosmopolitan libc | 29 | 6 | 83% | 10 | — | Approved |
| Sp.h standard library for CThis page | 11 | 27 | 29% | 1 | — | — |
| GLib | 6 | 3 | 67% | 4 | — | — |
What people said
40 of the 47 comments that mention it, newest first. Each links to the original comment.
“The author is guessing at best.”
“In that, I think the author misses the point.”
“He's done the first 90%, leaving only the other 90%”
“Congrats! This is a feat!”
“it's contradictory with the project's own principles”
“It isn't a good fit for anything "exotic" like non-64-bit platforms.”
“don't crow about how 'extremely' portable you are”
“The header includes the implementation too which will get compiled.”
“since the library is factored with this in mind”
“So every program using sp has to re-invent malloc or multiple copies of their own bespoke allocator”
“Moreover, the quality of what's been added is significantly worse.”
“It's an odd stance for a C library.”
“he doesn't even try to support major platforms like RISC-V”
“So if you are forced to use C for some reason this could help.”
“I'd rather have many modules that can be individually included, than one giant file.”
“Both of those approach (but especially pthreads) are contradictory to the explicit goals of programming against lowest level interfaces”
“Unfortunately though this particular header seems to include the system headers up in the declaration part of the header.”
“The github repo builds and the examples run just fine on macOS”
“It works perfectly well as a traditional library.”
“that example reads basically like a slightly worse TypeScript to me”
“All heap objects being page aligned on most microarchs ends up making every object start at cache set 0”
“This is a feature, not a bug.”
“The number might just be zero - did anyone check if this compiles?”
“the math functions are really bad implementations”
“There should be a fallback for very long paths.”
“I just wasted ten minutes of my life reviewing slop that I'm not going to get back.”
“It's a disadvantage, that it's header-only. It needs to include and a bunch of other stuff, which slow-downs compilation.”
“I could not even find a mention what platform it supports.”
“I was about to bookmark the repo for later you saved me the time”
“the juice ain’t worth the squeeze when it comes to low level, compute-bound performance.”
“Yet another slop coded library.”
“sp's implementation returned 0.4385. That's not even close to right.”
“I love how hyper-opinionated this is.”
“"extremely portable" is actually marketing for "It supports a number of platforms.”
“the math functions are really bad implementations. The range reduction on the sin/cos functions are yikes-level.”
“Those are contradictory. Either the code is extremely portable, or it can't support "obscure" platforms, but not both.”
“That seems to be a pretty consistent quality level for the entire library.”
“the default allocator uses mmap(2) for every single allocation, which is horribly inefficient”
“I don't trust the vibe coded code at all.”
“using sp.h as your base gives you that by default”
Counts come from 1,795,640 Hacker News comments, November 2025 to November 2026. How we count. Report a mistake.