3 ms·
Still that's awful. I way prefer the Rust way of "simulated exceptions" via Result return types (currently only available in nightly though).
by bestouff 2y ago
Still that's awful. I way prefer the Rust way of "simulated exceptions" via Result return types (currently only available in nightly though).
- dataflow 2y agostd::expected?
- jeffreygoesto 2y agoJust be aware that this is a variant and can't be returned via a register, but needs the stack. In (very) hot paths it can be worth switching back to single return values.
- kldx 2y agoAren't we paying for Result types every time it's used? A result of a 64 bit value wouldn't fit into $eax for example (I understand there are exceptions to this rule through invalid bit pattern optimizations)
- kldx 2y agoApologies, I mean $rax