4 ms·
> It also seems that there's a middle road that isn't often taken (possibly with the exception of gaming) where you can use assembly language (at least for perf
by kmicklas 11y ago
> It also seems that there's a middle road that isn't often taken (possibly with the exception of gaming) where you can use assembly language (at least for performance critical sections).
Is using assembly really a meaningful advantage though? I think FPGAs have the advantage of being a completely different architecture which allows different algorithms with non-constant factor speedups. Assembly is going to give at most something like a constant factor 5% speedup and that's being pretty optimistic (assuming C baseline).
- cbsmith 11y agoThat's not entirely true... C imposes some basic architecture structures (heap, stack, calling conventions, etc.) which can impose non-linear efficiency costs.
- robryk 11y agoAll of those costs, except for heap allocation related ones, are roughly per-function-call costs. If a function gets inlined, an optimizer can get rid of them. Also, don't some link time optimizers help with pessimizations related to calling conventions?
- cbsmith 11y agoA sufficiently smart compiler/linker can always undo things.