Re:Let's write a setjmp
by umanwizard on Sunday February 12, 2023 @10:25AM
(#34763496)
> it is a clear and precise syntax for expressing the operation the machine actually performs.
No it’s not. Your compiler will almost certainly translate this into vector instructions, at least.
Re:Let's write a setjmp
by umanwizard on Sunday February 12, 2023 @03:18PM
(#34766446)
For posterity, I was apparently wrong. It doesn’t autovectorize, with gcc 12.2 -O3 on godbolt, at least.
This isn't a "clever one-liner" it is a clear and precise syntax for expressing the operation the machine actually performs.
while(copy(current(stream_a), current(stream_b)) and not end_of_stream(stream_a))
You might prefer the above, but then, that's every other major language. The beauty of C is that the above code has to compile to something like the C version. C just allows you to actually express it