3 ms·
I’m sympathetic to the argument that C isn’t realistically a “high-level assembler” any more, but if there is low-hanging performance fruit available for a lang
by twoodfin 7y ago
I’m sympathetic to the argument that C isn’t realistically a “high-level assembler” any more, but if there is low-hanging performance fruit available for a language free to dispense with C’s PDP-11-flavored abstractions, I haven’t seen practical examples of it.
If anything, more modern languages (eg Java) have to contort their data representations to build, say, “structs of arrays” that are highly efficient on modern CPUs (and trivial to express in C!)
I’m very curious to hear of any recent languages that are designed expressly with “mechanical sympathy” in mind.
- aratakareigen 7y agoHow are structs of arrays more natural in C than in Java?
- nemo1618 7y agoRegarding your SoA example, Jai has explicit support for switching between SoA and AoS without having to rewrite everything: https://github.com/BSVino/JaiPrimer/blob/master/JaiPrimer.md#data-oriented-structures https://github.com/BSVino/JaiPrimer/blob/master/JaiPrimer.md...
- polityagent 7y agoI believe jblow removed this in more recent versions.
- ChrisSD 7y agoThe trouble is both processor instructions and compilers have been optimized for C (well C and FORTRAN). So no matter how good or bad C is, we're mostly "stuck" with its PDP-11 computing model unless someone does a lot more work than just making a new programming language.
- user234683 7y agoThe ISPC language by Intel is designed to give enough information to the compiler so as to allow auto SIMD-vectorization of programs [1]. It opts for an explicitly parallel model of programming, unlike C [2]. It also has easier support for SOA and AOSOA [3]. [1] https://ispc.github.io/ https://ispc.github.io/ [2] https://ispc.github.io/ispc.html#the-ispc-parallel-execution-model https://ispc.github.io/ispc.html#the-ispc-parallel-execution... [3] https://ispc.github.io/ispc.html#structure-of-array-types https://ispc.github.io/ispc.html#structure-of-array-types