Better HN
topnewbestaskshowjobs
Log inSign up

conmak

1 karma · joined Feb 25, 2026 (9mo ago) · 3 submissions

Submissions

comment 2mo ago · link · parent

Type Enforced is a zero-dependency Python library (plus an automatic C++ build with fallback if you have a compiler) for high-throughput runtime type validation. It verifies standard and nested type annotations on callables very fast.

For a simple int validation, it adds ~10 nanoseconds of overhead (less than a frame call) by manipulating the code via AST. Other performance gains if using the C++ variant include loop unrolling for complete nested checks and much more.

On a practical level, it speeds up development for humans and AI agents alike.

It's ~15x faster than beartype for sampled validation It's ~20x faster than pydantic for full validation

Benchmarks: https://github.com/connor-makowski/type_enforced/blob/main/b...

Example: ```python from type_enforced import Enforcer

@Enforcer def process_point(x: float) -> dict[str,float|int]: return {"point": x}

process_point(1.5) process_point("invalid") # Raises error ```

2.

Type_enforced: Fastest Python Runtime Type Enforcement(github.com ↗)

2 points · by conmak · 2mo ago · 1 comment

comment 9mo ago · link · parent

As a researcher at MIT who has worked on the BMSSP problem, the algorithm this is claiming to implement, this is not a BMSSP implementation. I am not even sure what it is, but the code is AI Slop.

If you want to see actual research (which shows that shows BMSSP is actually far slower for any realistic sized network), check out:

C++

https://github.com/lcs147/bmssp https://arxiv.org/abs/2511.03007

Python -> BMSSPy

https://papers.ssrn.com/sol3/papers.cfm?abstract_id=5777186 https://github.com/connor-makowski/bmsspy