|
|
Subscribe / Log in / New account

Cython 3.0 released

Version 3.0 of Cython (described as "a programming language that makes writing C extensions for the Python language as easy as Python itself") has been released. Changes include support for Python through 3.11 (but 2.6 support was dropped), the implementation of a number of PEPs, initial support for the CPython limited API, better exception handling, and more.

to post comments

Cython 3.0 released

Posted Jul 19, 2023 2:27 UTC (Wed) by Cyberax (✭ supporter ✭, #52523) [Link]

Aaaaaand everything broke down.

I've just spent several hours wrangling dependencies of awscli and other dependencies.

Cython 3.0 released

Posted Jul 19, 2023 2:39 UTC (Wed) by ccchips (subscriber, #3222) [Link]

Sounds dangerous. If I ever get back to work (I'm in my 70s,) I hope I don't wind up with a "boss" who wants me to use this thing.

Cython 3.0 released

Posted Jul 19, 2023 8:38 UTC (Wed) by rsidd (subscriber, #2582) [Link] (2 responses)

I have used cython some years ago. It worked as advertised, but just felt too fiddly. I have since switched to julia, and don't see myself trying cython again.

Cython 3.0 released

Posted Jul 19, 2023 16:52 UTC (Wed) by NYKevin (subscriber, #129325) [Link] (1 responses)

Having played with it myself, the main benefit, IMHO, is just how easily it integrates into an existing Python project. I mean, sure, your build process gets a great deal more complicated, and for some that's a dealbreaker in its own right, but if you're willing to put up with that, you can literally just write Python code, throw in some annotations here and there, it magically speeds up by quite a long way, *and* it's still 100% callable from the Python side of the fence. If you've already got something 90% of the way to working in NumPy, but you just have this one place where you'd really like to write your own element-by-element loop, without killing the performance, and without having to fiddle with broadcasting etc., Cython lets you do that.

Cython 3.0 released

Posted Jul 19, 2023 18:25 UTC (Wed) by mb (subscriber, #50428) [Link]

> throw in some annotations here and there

Yep. And that can be done incrementally. Starting with no annotations at all, which will already get you a couple of percent of performance gain, because the interpreter is not involved in executing these compiled modules anymore.


Copyright © 2023, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds