Readit News logoReadit News
wjakob commented on The hidden compile-time cost of C++26 reflection   vittorioromeo.com/index/b... · Posted by u/SuperV1234
wjakob · 3 days ago
I am very worried by feature creep in libc++ and libstdc++ and the harm that this inflicts on the wider C++ ecosystem. Transitive inclusion of large parts of the STL, and entangling of STL with core language features are both extremely bad. This should IMO be topic #1 of the committee but is barely even noticed. The mantra "It's okay, modules will save us" is naive and will not work.
wjakob commented on Cython is 20   blog.behnel.de/posts/cyth... · Posted by u/geococcyxc
logicchains · 4 years ago
>I would recommend considering using NanoBind, the follow up of PyBind11 by the same author (Wensel Jakob), and move as much performance critical code to C or C++

Why would you recommend that? It's all way more effort than just writing Cython, especially in a Jupyter Notebook. And Cython code can be just as fast as C/C++ code unless you're doing something really fancy. It's a bunch of work for no benefit.

>Warp jits and runs your code on CUDA or CPU

If someone's writing Cython it's probably because they found something that couldn't be done efficiently in Numpy because it was sequential, not easily vectorisable. Such code is going to get zero benefit from Cuda or running on the GPU.

In general, all your jitted code is not going to be as fast as code compiled with an ahead-of-time compiler like the C compiler that Cython uses. Moreover if you use a JIT then it makes your code a pain in the ass to embed in a C/C++ application, unlike Cython code.

wjakob · 4 years ago
> Why would you recommend that? [..] It's a bunch of work for no benefit.

nanobind/pybind11 (co-)author here. The space of python bindings is extremely diverse and on the whole probably looks very different from your use case. nanobind/pybind11 target the 'really fancy' case you mention specifically for codebases that are "at home" in C++, but which want natural Pythonic bindings. There is near-zero overlap with Cython.

wjakob commented on The team that powers VLC (2019)   increment.com/teams/the-t... · Posted by u/feross
wjakob · 4 years ago
There is also IINA that somehow seems more snappy/better-integrated on macOS.
wjakob commented on Python 3.9   python.org/downloads/rele... · Posted by u/kumarvvr
wjakob · 5 years ago
Caution: if you rely on pybind11 or a project using pybind11 (many projects do, like NumPy/SciPy/Tensorflow/PyTorch..), hold off on upgrading to Python 3.9.0 for now.

A change in Python 3.9.0 introduces undefined behavior in combination with pybind11 (rarely occurring crashes, but could be arbitrarily bad). We will work around it in an upcoming version of pybind11, and Python will separately also fix this problem in 3.9.1 slated for release in December.

Details available here: https://pybind11.readthedocs.io/en/latest and https://github.com/python/cpython/pull/22670.

Deleted Comment

u/wjakob

KarmaCake day322December 13, 2015
About
Associate professor leading EPFL's Realistic Graphics Lab. My research involves inverse graphics, material appearance modeling and physically based rendering.
View Original