Language:
switch to room list switch to menu My folders
Go to page: First ... 42 43 44 45 [46]
[#] Tue Dec 07 2021 10:07:26 EST from IGnatius T Foobar

[Reply] [ReplyQuoted] [Headers] [Print]

Python is the first to ever have true client side processing. It was
ahead of its time. And i blame Guido for doing it and stating down
that path..    Personally i feel it was never what the web was

I don't understand. Was there an early experiment that put Python inside a browser? And if so, what did it do? DOM level 1 didn't appear until 1998, and by then Javascript was already in widespread use.

True 100% client-side web applications weren't really feasible until DOM level 2 or 3, in th mid 2000s... before that, you really needed a plugin like Java or Flash.

What was the web "supposed to be?" Tim Berners-Lee might have agreed with you that it was only supposed to be a document management system. Marc Andreesen seemed to know that it would become a platform, but he may not have fully grokked the technical details. I think it was Sun's vision of "network computing" that was the most prescient -- all software dynamically loaded from a remote server at runtime, all storage behind the glass, the platform software itself being the only thing persistently loaded on the local device -- they really nailed it one hundred percent, except the technology ended up being HTML5+DOM+Javascript instead of Java.

[#] Tue Dec 07 2021 10:07:51 EST from IGnatius T Foobar

[Reply] [ReplyQuoted] [Headers] [Print]

Clang 13 flatly refuses to auto-vectorize, though I might be able to

force it with #pragmas.

I've been staring at this for two weeks and I really wish I understood it.
:(

[#] Tue Dec 07 2021 15:02:10 EST from LoanShark

[Reply] [ReplyQuoted] [Headers] [Print]

2021-12-07 10:07 from IGnatius T Foobar
Clang 13 flatly refuses to auto-vectorize, though I might be able to


force it with #pragmas.

I've been staring at this for two weeks and I really wish I understood

it.
:(

It was my first foray into vectorization and it was a silly concept that doesn't easily benefit from vectorization, so kind of doesn't matter that clang doesn't handle this case.

What it is, is the inner loop of a sieve of eratosthenes; the loop that goes through a flag array and marks multiples of the current prime as composites.

It has a couple of optimizations in that it's based on a modulo-6 wheel: see https://en.wikipedia.org/wiki/Wheel_factorization

With a mod-6 wheel, all prime candidates will have either n mod 6 == 1 or n mod 6 == 5. This means that we can skip certain multiples and that every time the wheel repeats, there are two increments: either 2 or 4. That's why the loop has two increments, rot1 and rot2 - it marks off prime candidates in a specific repeating pattern characterized by rot1 and rot2.

Anyway, it doesn't vectorize well because there's no reason that the stores fall in the same vector register. There's another loop in a full implementation that *does* vectorize well, that's the count-the-true-flags loop that comes next.

I learned far too much about AVX2 and AVX512 a couple weeks ago :)

Go to page: First ... 42 43 44 45 [46]