Hacker News new | past | comments | ask | show | jobs | submit login
A 100x speedup with unsafe Python (yosefk.com)
3 points by fletchr 4 months ago | hide | past | favorite | 2 comments



Me going into the article: "Will probably make a DLL in C and import ctypes". Close enough I guess.

>Today, from my point of view, Python functions as a packaging system for popular C/C++ libraries.

I have that exact same feeling as well.

I would say though that unsafe Rust feels a bit different to me than unsafe C or even this style of Python. I wouldn't consider myself a Rust expert at all(written some trade execution/algotrading code, currently working through the Proc Macro workshop repo) but every unsafe Rust code I've seen out there in the wild either explicitly explains why the behavior is actually safe or tells you precisely how it can fail(not at all what I saw with C) in the comment.


I dunno if "close enough", but there's no C code in TFA, only Python. ctypes - guilty as charged




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: