News for hackers. Stuff that matters.

atom3

Re:GC progress from JDK 8 to JDK 17 on Wednesday November 24, 2021 @01:34PM (#29333432)
According to the cppcon talk about Mesh [1] (an allocator that implement compaction for C++ programs), the overhead can be massive too (17% overhead measured on firefox, 50% on redis!)

[1] https://youtu.be/XRAP3lBivYM?t=1374

Re:Using WebAssembly threads from C, C++ and Rust on Wednesday July 21, 2021 @10:06AM (#27906480)
I've not try that but wouldn't the html meta tag work as well?

Something like

  <head>
    <meta http-equiv="Cross-Origin-Embedder-Policy" content="require-corp" />
    <meta http-equiv="Cross-Origin-Opener-Policy" content="same-origin" />
    ...
  </head>
Re:Metaprogramming custom control structures in C (2012) on Saturday July 10, 2021 @05:08PM (#27796489)
When I found out about this, I wrote some macros to replicate some of the semantic of ISPC [1] in C++ as a fun experiment [2].

Of course it has no practical value but it was really cool to see it was possible to do so.

[1] https://ispc.github.io/

[2] https://github.com/aTom3333/ispc-in-cpp-poc

Re:SIMD for C++ Developers [pdf] on Tuesday April 27, 2021 @04:55PM (#26961416)
Oh right, I didn't think of looking for that, guess you're right and doing things by hand is still better
Re:SIMD for C++ Developers [pdf] on Tuesday April 27, 2021 @03:56PM (#26960703)
> Here’s an example how to compute FP32 dot product with intrinsics: https://stackoverflow.com/a/59495197/126995 I have doubts the ISPC’s reduction gonna result in similar code. Even clang’s automatic vectorizer (which I have a high opinion of) is not doing that kind of stuff with multiple independent accumulators.

ISPC lets you request that the gang size be larger that the vector size [1] to get 2 accumulators out of the box. If having more accumulator is crucial, you can have them at the cost of not using idiomatic ispc but I'd argue the resulting code is still more readable.

I'm no expert so they might be flaws that I don't see but the generated code looks good to me, the main difference I see is that ISPC does more unrolling (which may be better?).

Here is the reference implementation: https://godbolt.org/z/MxT1Kedf1

Here is the ISPC implementation: https://godbolt.org/z/qcez47GT5

[1] https://ispc.github.io/perfguide.html#choosing-a-target-vect...