4 ms·
It depends. ML or ATS code can perform faster than hand-written C code, despite the fact both MLton and ATS compilers actually generate C code, effectively addi
by snaky 8y ago
It depends. ML or ATS code can perform faster than hand-written C code, despite the fact both MLton and ATS compilers actually generate C code, effectively adding the layers of abstractions.
And you can have the verification for free also.
> We introduce a new approach for implementing cryptographic arithmetic in short high-level code with machine-checked proofs of functional correctness. We further demonstrate that simple partial evaluation is sufficient to transform into the fastest-known C code, breaking the decades-old pattern that the only fast implementations are those whose instruction-level steps were written out by hand.
http://adam.chlipala.net/papers/FiatCryptoSP19/FiatCryptoSP19.pdf http://adam.chlipala.net/papers/FiatCryptoSP19/FiatCryptoSP1...
- austincheney 8y agoCompiler output isn't an abstraction. It's what is ultimately executed where the compiler's source sample is not. For an apples to apples comparison I am claiming the code compiled from a framework is going to be slower than well written code without a framework. I am also claiming you well be painfully challenged to prove otherwise. Frameworks don't exist to make code faster. They exist to provide an abstraction layer.