Live data from Hacker News

Everyone should know SIMD

mitchellh.com

101–110 of 263 posts

Re: Everyone should know SIMD

#101
post #84

Isn't the better abstraction here to use a higher level library in the style of pandas/polars that will operate as vectors, compose and feel readable and inuitive, while (almost?) maxing out SIMD?

Most code cannot be expressed this way unfortunately

Sure, but we're not talking about most code, we're talking about "code that would benefit from SIMD"

Re: Everyone should know SIMD

#102
Most of my stuff isn't CPU-bound. Most of it is in managed languages, like Bash and C# and SQL and Python and Yaml and .tsx .

It's been at least a decade for me since SIMD was more than an implementation detail handled by the runtime. And even then it was "how do I avoid preventing the runtime from vectorizing this".

Re: Everyone should know SIMD

#104
post #85

It distresses me that we don’t have a language that can do a best effort parallelization of arbitrary loop like code across SIMD, multiple threads, multiple cores and GPU with a small directive. I don’t need it to be optimal, just … handy as an option! The last time I brought this up here, folks offered a bunch of options that don’t quite do this, and the best candidate was this 15 year old compiler project that is I…

> best effort parallelization of arbitrary loop like code across SIMD, multiple threads, multiple cores and GPU with a small directive.

I doubt GPU is included by most runtimes yet, but for the rest of that have you tried SQL?

Re: Everyone should know SIMD

#107
post #85

It distresses me that we don’t have a language that can do a best effort parallelization of arbitrary loop like code across SIMD, multiple threads, multiple cores and GPU with a small directive. I don’t need it to be optimal, just … handy as an option! The last time I brought this up here, folks offered a bunch of options that don’t quite do this, and the best candidate was this 15 year old compiler project that is I…

The problem is you need both a PL nerd and a performance nerd and while that group has some overlap so these people are not as uncommon as you’d think the task is pretty hard so you need a lot of people on it, with a bunch of funding, etc. Usually it’s just cheaper to rewrite all your code by that point and so these efforts fail

It seems like such a tempting gap though. The sort of thing you’d think in 2015 would be an obvious capability of 2026 languages!

Re: Everyone should know SIMD

#108
post #85

It distresses me that we don’t have a language that can do a best effort parallelization of arbitrary loop like code across SIMD, multiple threads, multiple cores and GPU with a small directive. I don’t need it to be optimal, just … handy as an option! The last time I brought this up here, folks offered a bunch of options that don’t quite do this, and the best candidate was this 15 year old compiler project that is I…

> best effort parallelization of arbitrary loop like code across SIMD, multiple threads, multiple cores and GPU with a small directive. I doubt GPU is included by most runtimes yet, but for the rest of that have you tried SQL?

A genuinely funny and good point!

Re: Everyone should know SIMD

#109
post #85

It distresses me that we don’t have a language that can do a best effort parallelization of arbitrary loop like code across SIMD, multiple threads, multiple cores and GPU with a small directive. I don’t need it to be optimal, just … handy as an option! The last time I brought this up here, folks offered a bunch of options that don’t quite do this, and the best candidate was this 15 year old compiler project that is I…

ISPC isn’t Intel-only: https://github.com/ispc/ispc

Good to know!

Re: Everyone should know SIMD

#110
post #77
post #73

Earlier quoted context omitted.

in many cases often its faster just to switch from debug to release - compilers are good to vectorise many loops. Worth to give it a try before rewriting clean loop/code into SIMD/NEON.

Stop using electron

Never. You will have to pry it from my cold, dead hands.
Post reply on HN