HNHacker News
TopNewBestAskShowJobs

ummaycoc

3 karma · joined October 25, 2019

I've seen code you people wouldn't believe. Attack macros on fire off the shoulder of the C preprocessor. I watched generators glitter in the dark near the Python runtime. All that source will be lost in private repositories, like tears in rain. Time to work.
submissionscomments
ummaycoc··on Beating C with Futhark Running on GPU
Would you mind sharing the 0.27s version?
ummaycoc··on Beating C with Futhark Running on GPU
In my original version I didn't use a nested array of strings, but [Olzd](https://news.ycombinator.com/user?id=olzd) pointed out a way you could do that and I added it as a theoretical first attempt (theoretical since it wasn't my first attempt, but would have been had I been better at APL).

My first attempt did some stuff with subtracting items in an array from their neighbor. Now with info I got from [mlochbaum](https://news.ycombinator.com/user?id=mlochbaum) I have another version that uses windowed reductions.

So those are three versions there; after that I just split it up just to see where that leads and that actually ends up feeling a lot like the Haskell / Futhark solution to me.

ummaycoc··on Beating C with Dyalog APL
Do you have an explanation handle on the windowed reductions? Specifically what the number on the left means in this case (or in general)? I've tried it and it looks like `(n+1)</v` is basically `2</(n</v)` for `n>1` but I also see some things that don't exactly fit that pattern.
ummaycoc··on Beating C with Dyalog APL
I definitely heard at least one mention of Dyalog APL there last year (not in a conversation I was in, I was literally walking past some others who were chatting).

I hope to see some of you there sometime in the future.

ummaycoc··on Beating C with Dyalog APL
Awesome. Would you mind if I add a version like this to the article and acknowledge you?

Also, will anyone from Dyalog be at Code Mesh?

> One of the advantages seen in this wc function is our use of bit booleans rather than byte booleans. Packing 8 bits in a byte uses eight times less space, and can lead to drastic speed improvements: 2-8 times faster than even code which uses short ints.

I once rewrote a structured verilog compiler (when I was the sole full time employee at ChipScan.us); going from using bytes to store boolean values to packing the entire circuit's wire state into bits in a char* definitely helped a lot. Also marking that char* as restrict helped a lot, too :-)

Big wins are made of many small victories.