4 ms·
Or, maybe stop doing pointer arithmetic? We have had some pretty good new languages appear in the last 7 years. I know people are averse to change, me included.
by 2h 4y ago
Or, maybe stop doing pointer arithmetic? We have had some pretty good new languages appear in the last 7 years. I know people are averse to change, me included. But you may want to ask yourself if continuing to use a 50 year old language is the right answer.
- eklitzke 4y agoThis example isn't doing pointer arithmetic.
- jeffbee 4y agoYes, it is. const __m512i *ptr1 = (const __m512i*)container1->words; Then later: __m512i r1 = _mm512_loadu_si512(ptr1+i);
- zaptheimpaler 4y agoThis is low level code written in a library to make full use of AVX-512.. which is inherently a processor native feature that has to be written in a language close to assembly because the processor only understands machine code.. there is no way to avoid assembly or the pointer arithmetic. Someone has to do the pointer arithmetic so the higher level languages and libraries don't have to.
- loup-vaillant 4y agoWell, then the proper response from Github would be something like: WARNING: HIGH-TO-CRITICAL SEVERITY: You are using C. C is not memory safe, and likely to expose your users to critical vulnerabilities. Not sure it would fly.
- Snetry 4y agoOh how correct you are. Let us throw away all the existing code written in languages made in a different age and use languages that are completely binary incompatible just because we can.