#Cython

2025-12-24

#borgbackup 2.0.0b20 was just released!

There is quite some new stuff and also some fixes, please help with testing the betas!

github.com/borgbackup/borg/rel

#backup #linux #bsd #macOS #openindiana #haiku #python #cython #borg

🐍👨‍💻 #PythoC — це новий проєкт, який дозволяє використовувати Python як генератор C-коду, пропонуючи більше можливостей і гнучкості, ніж #Cython. Це перший огляд нового інструмента генерації C-коду з #Python, орієнтованого передусім на створення самостійних C-програм.

🔗 proit.ua/pythoc-novi-mozhlivos
🔗 infoworld.com/article/4101101/

2025-11-27

Does anyone know of a good overview how much overhead using ctypes to call functions from a dynamic library adds to #python code instead of building a native extension e.g via #cython #pybind11 or #nanobind ?

A blog post with some statistics would be perfect but just ballpark figures from anyone who knows what they are talking about is fine

Ashwin V. Mohananashwinvis@fediscience.org
2025-11-26

I have officially started working as the training coordinator at #MimerAIF (mimer-ai.eu/). What better way to kick things off than a course?! These days I am teaching parts of the #PythonForScicomp course in partnership with @coderefinery and @SciCompAalto.

Tomorrow is the last day of the course, but you can still join!

scicomp.aalto.fi/training/scip

I will be covering the episodes on #Cython and #Packaging.

Banner for the course Python for scientific computing 2025
danzindanzin
2025-10-27

Fuzzing pyhacl (codeberg.org/drlazor8/pyhacl), a package of Cython bindings for HACL* (the High Assurance Cryptographic Library), with fusil we only found one crash.

It turned out to actually be a silly bug in :

Issue: github.com/cython/cython/issue

Fix: github.com/cython/cython/pull/

Goes to show how fuzzing a C-extension can uncover crashes in many different layers.

Thanks @drlazor8 for taking up the call for C-extensions maintainers to fuzz their code.

N-gated Hacker Newsngate
2025-10-06

Ah, the timeless quest for speed: From to , because obviously what we all need is yet another layer of to solve the crippling issue of Python's infamous sloth 🐢🔥. Nothing says "a productive day" like translating code from one esoteric dialect to another while dreaming of the gains that never quite materialize 🚀😂.
fnands.com/blog/2025/sklearn-m

GripNewsGripNews
2025-10-06

🌗 Cython 轉譯 Mojo 初探:以 scikit-learn 為例
➤ 探索 Mojo 的 Python 互操作性,並嘗試加速 Cython 程式碼
fnands.com/blog/2025/sklearn-m
本文作者 Ferdinand Schenck 分享了他將 scikit-learn 中的 Cython 程式碼初步轉譯至 Mojo 的經驗。他選用了 DBSCAN 演算法中的一個小型內部函式 `dbscan_inner` 作為測試案例,該函式僅接受三個參數,符合 Mojo 目前的 Python 互操作性限制。轉譯過程大部分是直接複製貼上 Cython 程式碼,並加入 Mojo 的模組初始化程式碼,過程出乎意料地順利。然而,首次的 Mojo 轉譯版本效能表現遠不如 Cython,作者推測是因為 Mojo 在處理 Python 物件時無法有效優化。為瞭解決此問題,作者嘗試將 NumPy 陣列轉換為 Mojo 的 Span 類型,此方法雖略顯繁瑣,但能

2025-09-26

[Перевод] Почему Python такой медленный? И вот что об этом думают эксперты

Команда Python for Devs подготовила перевод статьи о том, почему Python так медленный и что сообщество делает, чтобы это исправить. PyCon 2024 показал: Python ждут субинтерпретаторы, immortal objects, JIT-компиляция и другие технологии, которые могут ускорить его в разы.

habr.com/ru/articles/948858/

#python #производительность #gil #субинтерпретаторы #cython #jit #типизация #оптимизация #многопоточность #pycon

Sharlatansharlatan
2025-09-22

lovers masters and twisters, your turn in the final rounds

codeberg.org/guix/guix/issues/

2025-08-11

Python: Schneller als man denkt

Beginn einer Artikelserie zum Thema schneller Python Code. Eine Einführung mit einer Auflistung verschiedener Strategien die verglichen werden.

#Python #Cython #Numpy #Numba #Linux

gnulinux.ch/python-schneller-a

2025-07-05

📣 New tutorial at #EuroSciPy2025:
“Using Cython and C++ Kernels to Speed Up Python Libraries”
💻 With Anatoly Volkov & David Cortes

🧠 Learn where Python hits performance bottlenecks
⚙️ Implement linear regression kernels in Cython & C++
🔗 Use pybind11 to bridge C++ with Python
📊 Benchmark and compare performance

Walk away ready to build or contribute to faster, open-source scientific libraries.

📅 euroscipy.org/schedule
#Cython #Cpp #OpenSource #Pybind11 #ScientificComputing

Ankur Sinha "FranciscoD"sanjay_ankur@fosstodon.org
2025-06-10

If you're seeing your #NEST simulator builds fail recently, it's because of a new #Cython release:

github.com/nest/nest-simulator

Workaround: fix `cython<3.1.0` for the moment (until new NEST releases with the fix are made)

#ComputationalNeuroscience #ComputationalModelling #Neuroscience #AcademicChatter

2025-05-15

En route to @pycon after a brief stopover in NYC for part of Never Graduate week!

I’ll be talking about debugging in #cython (both at runtime and for memory management) on Saturday just after lunch.

us.pycon.org/2025/schedule/pre

Looking forward to seeing everyone at the conference!

#pycon25 #pyconus

Andrew Dalkedalke@toots.nu
2025-02-04

Hot off the presses!

hg.sr.ht/~dalke/hidden_shuffle

hidden_shuffle, an implementation of the Hidden Shuffle method for sequential random sampling.

Given a population of size N, randomly choose k elements (0<k<=N), and iterate over the elements in increasing index order.

Implemented in C. Use 'make' to create a command-line executable. Use "pip install ." (or your installer of choice) #cython wrapped #Python extension.

2025-02-02

I'm happy to announce a new version of our #pycraf #Python package:

github.com/bwinkel/pycraf

The only change is that it now runs with numpy v2. Doesn't sound like much, but it was some effort, as pycraf uses a lot of #Cython (i.e., compiled code) under the hood.

I was extremely happy when I realized that with numpy 2 one doesn't need to pin certain versions for ABI compatibility anymore. If you don't know what that means, don't worry - it's developer/package maintainer stuff. Apparently, even if you build the binary packages with numpy v2, it should still run under numpy v1. Magic. Will safe me hours of maintenance time, which can be better spent on new features.

2025-01-29

@isaaclyman
That's pretty much how #Python optimizing compilers like #cython, #mypyc, #numba, and #TaichiLang work, and iiuc is the idea behind #MOJOlang.

As for leaky abstractions, I'd mitigate that by moving the lower-level algorithms into a separate module and limit the optimization pass to that module. Higher-level modules, like CLI entry points or API server route handlers, shouldn't need the extra optimization.

Alexandre B A Villares 🐍villares@ciberlandia.pt
2024-12-31

@nen while still on Python, have you tried scientific computation speed up things like #Numba ? Also, I once saw a #Cython talk and I was almost convinced to give it a go (but I'm too lazy) :D

Alexander Tikhonovtikhonov_a
2024-11-23

Just published 3.15 with the plugin system! 🎉 I guess the next thing will be plugins for serialization and deserialization. Who knows, maybe this will be my ticket to strict validation and speeding up with . On a side note, I believe I’m among the last developers to discontinue support for 3.8.

github.com/Fatal1ty/mashumaro/

2024-11-03

Как реализовать быструю реентерабельную блокировку на Python и почему она работает

В стандартной библиотеке языка Python имеется базовый примитив синхронизации — реентерабельная блокировка. Она позволяет одному и тому же потоку, несколько раз захватить блокировку. Стандартная реализация может использовать для блокировки мьютекс или семафор, и их захват всегда приводит к вызову функции из ядра ОС. Используя GIL (Global Interpreter Lock - Глобальная блокировка интерпретатора) и особенности реализации Threading.Lock.release можно создать более быстрый вариант. Давайте попробуем разобраться

habr.com/ru/articles/855728/

#python #cython #locks

Client Info

Server: https://mastodon.social
Version: 2025.07
Repository: https://github.com/cyevgeniy/lmst