Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
ngoldbaum
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
8 ms
·
1.
▲
Teaching NumPy's ufuncs new tricks
(labs.quansight.org)
3 points
by
ngoldbaum
8d ago
|
1 comments
2.
▲
by
ngoldbaum
1mo ago
I’m saying that it’s a new issue on the free-threaded build.
3.
▲
by
ngoldbaum
1mo ago
There’s also the fact that INCREF and DECREF on shared objects is a lot more expensive than plain integer addition, so stuff becomes a bottleneck that was never a bottleneck. Kumar also fixed a bottleneck caused by a lock added only for saf
4.
▲
by
ngoldbaum
1mo ago
I’m not sure why it took me, a NumPy developer, looking at the benchmark numbers and saying “hmm, this is a bug”. But that is what it took. People are sometimes slow to treat behavior in dependencies like NumPy as bugs.
5.
▲
Scaling NumPy on Free-Threaded Python
(labs.quansight.org)
114 points
by
ngoldbaum
2mo ago
|
24 comments
6.
▲
by
ngoldbaum
2mo ago
I’m glad you enjoyed the post. It really helped me to crystallize my understanding. I was also confused about the API/ABI distinction for a long time.
7.
▲
by
ngoldbaum
2mo ago
Thanks for pointing that out, I’ll fix that.
8.
▲
What Every Python Developer Should Know About the CPython ABI
(labs.quansight.org)
2 points
by
ngoldbaum
2mo ago
|
0 comments
9.
▲
Scaling Asyncio on Free-Threaded Python
(labs.quansight.org)
2 points
by
ngoldbaum
1y ago
|
0 comments
10.
▲
by
ngoldbaum
1y ago
I wonder why the github status page has an atlassian cookie request pop-up.
11.
▲
Python Free-Threading Guide
(py-free-threading.github.io)
2 points
by
ngoldbaum
1y ago
|
0 comments
12.
▲
The first year of free-threaded Python
(labs.quansight.org)
16 points
by
ngoldbaum
1y ago
|
1 comments
13.
▲
by
ngoldbaum
1y ago
Either something about beanie babies or something riffing on "thank you". Couldn't ever make up my mind then basically forgot about it.
14.
▲
by
ngoldbaum
1y ago
I gave away the “ty” project name on pypi to Astral a week or so ago. I wanted to use it for a joke a few years ago but this is a much better use for a two letter project name. They agreed to make a donation to the PSF to demonstrate their
15.
▲
by
ngoldbaum
2y ago
You could do two passes over the string, first get the total length in bytes, then fill it in codepoint by codepoint. You could also pessimistically over-allocate assuming four bytes per character and then resize afterwards. With the API in
16.
▲
by
ngoldbaum
2y ago
The main difference is the strings are stored in a single contiguous arena buffer (with some minor caveats if you mutate the array in-place). With object strings each string has its own heap allocation. More details in NEP 55: https:/
17.
▲
by
ngoldbaum
2y ago
Ah I could see how that’s confusing. I was trying to indicate that the size stored for the string in the example is 28, but it’s stored in a 64 bit uint.
18.
▲
by
ngoldbaum
2y ago
They’re stored on the DType instance. This requires that there’s only one DType instance per “owned” array buffer, which I figured out how to do along with Sebastian Berg and others using the new DType system.
19.
▲
by
ngoldbaum
2y ago
That is something I’d like to see but I don’t want to wade into the already very complicated discussion around arrow strings in pandas. If a Pandas developer wanted to take this on I think that would make things easier since there’s so much
20.
▲
by
ngoldbaum
2y ago
This was a case of convergent evolution, both projects ended up working simultaneously on similar ideas. One issue with using Arrow directly in NumPy is PyArrow exposes an immutable 1D array, while NumPy exposes a mutable ND array. See also
21.
▲
by
ngoldbaum
2y ago
Well, there was no concept of sidecar storage. Now we have the hack we came up with for StringDType to store data on the DType instance and also make it so StringDType arrays don't share StringDType instances, unless the array is a v
22.
▲
by
ngoldbaum
2y ago
Thank you this really means a lot.
23.
▲
by
ngoldbaum
2y ago
No, it wouldn’t make sense to. Use threading.Lock for that. PyMutex is available in the CPython C API.
24.
▲
by
ngoldbaum
2y ago
https://github.com/numpy/numpy/issues/26510#issuecomment-229... And now that I look at that again I realize I forgot to finish that up!
25.
▲
by
ngoldbaum
2y ago
This style of mutex will also power PyMutex in Python 3.13. I have real-world benchmarks showing how much faster PyMutex is than the old PyThread_type_lock that was available before 3.13.
26.
▲
by
ngoldbaum
2y ago
The complaint [1] is linked in the article. They're suing over Intel internally using and redistributing the anaconda software distribution. [1] https://fingfx.thomsonreuters.com/gfx/legaldocs/znvnxomagvl/
27.
▲
Anaconda sued Intel for copyright infringement over AI software
(reuters.com)
2 points
by
ngoldbaum
2y ago
|
1 comments
28.
▲
by
ngoldbaum
2y ago
Clarifying a few days later: single-threaded performance in the normal ABI with the GIL does not have the same performance degradation. You only see the performance hit if you’re testing the experimental 3.13 free-threaded release.
29.
▲
by
ngoldbaum
2y ago
It’s an experimental release in 3.13. Another example: objects that will have deffered reference counts in 3.14 are made immortal in 3.13 to avoid scaling issues from reference count thrashing. This wasn’t originally the plan but deferred r
30.
▲
by
ngoldbaum
2y ago
Right now there is a significant single-threaded performance cost. Somewhere from 30-50%. Part of what my colleague Ken Jin and others are working on is getting back some of that lost performance by applying some optimizations. Expect singl
More ›