Readit News logoReadit News
pmeira commented on Beating NumPy matrix multiplication in 150 lines of C   salykova.github.io/matmul... · Posted by u/p1esk
rurban · 2 years ago
You'd need first to convert it to portable SIMD intrinsics. There are several libraries.
pmeira · 2 years ago
Apparently it also needs Clang to achieve the same performance: https://news.ycombinator.com/item?id=40875968
pmeira commented on Beating NumPy matrix multiplication in 150 lines of C   salykova.github.io/matmul... · Posted by u/p1esk
marmaduke · 2 years ago
Very nice write up. Those are the kind of matrix sizes that MKL is fairly good at, might be worth a comparison as well?

Also, if you were designing for smaller cases, say MNK=16 or 32, how would you approach it differently? I'm implementing neural ODEs and this is one point I've been considering.

pmeira · 2 years ago
Don't forget BLIS itself!
pmeira commented on Beating NumPy matrix multiplication in 150 lines of C   salykova.github.io/matmul... · Posted by u/p1esk
moomin · 2 years ago
I think it’s okay to say “This is the benchmark, now I’m going to compare it against something else.” It’s up to the reader to decide if a 3% (or 300%) improvement is worth the investment if it involves learning a whole other language.
pmeira · 2 years ago
It's a muddy comparison given that NumPy is commonly used with other BLAS implementations, which the author even lists, but doesn't properly address. Anaconda defaults to Intel oneAPI MKL, for example, and that's a widely used distribution. Not that I think MKL would do great on AMD hardware, BLIS is probably a better alternative.

The author also says "(...) implementation follows the BLIS design", but then proceeds to compare *only* with OpenBLAS. I'd love to see a more thorough analysis, and using C directly would make it easier to compare multiple BLAS libs.

Deleted Comment

pmeira commented on pg_timeseries: Open-source time-series extension for PostgreSQL   tembo.io/blog/pg-timeseri... · Posted by u/samaysharma
eyegor · 2 years ago
What do you mean by "for anything serious it isn't open source"? I didn't see any red flags in the apache variant of timescale, just constant pleading to try their hosted option.

https://github.com/timescale/timescaledb/blob/main/LICENSE-A...

pmeira · 2 years ago
Compression and other features use the non-Apache license:

https://github.com/timescale/timescaledb/tree/main/tsl

Deleted Comment

pmeira commented on Python 3.12   python.org/downloads/rele... · Posted by u/qsort
dandiep · 2 years ago
Ooh, seems there is a new syntax for declaring the types of kwargs [1]:

  from typing import TypedDict, Unpack
  
  class Movie(TypedDict):
    name: str
    year: int

  def foo(*kwargs: Unpack[Movie]): ...
Maybe now I'll be able to actually figure out what data to send libraries without actually reading their source code.

1. https://docs.python.org/3.12/whatsnew/3.12.html#pep-692-usin...

pmeira · 2 years ago
Some packages already use those. For previous Python versions, those are available in typing_extensions: https://typing-extensions.readthedocs.io/en/latest/

Deleted Comment

pmeira commented on Codespaces but open-source, client-only, and unopinionated   devpod.sh/... · Posted by u/el_hacker
gentele · 3 years ago
FF unfortunately does not support detecting the OS reliably...
pmeira · 3 years ago
"Linux x86_64" is present on my UA on Linux, and "Windows NT 10.0; Win64; x64" on Windows. Probably a bug or just untested on Firefox. Just a bit annoying.

I'll add that this is the first site that misdetects anything like that.

Deleted Comment

u/pmeira

KarmaCake day45September 27, 2020View Original