AK: Mark the error branch of the TRY() macro as unlikely

This results in a measurable (and free!) 2% improvement in test-js
run time.
This commit is contained in:
Idan Horowitz 2022-01-15 23:33:27 +02:00
parent 309d71a66b
commit 8a879e205b
Notes: sideshowbarker 2024-07-17 20:49:00 +09:00

View File

@ -12,7 +12,7 @@
#define TRY(expression) \
({ \
auto _temporary_result = (expression); \
if (_temporary_result.is_error()) \
if (_temporary_result.is_error()) [[unlikely]] \
return _temporary_result.release_error(); \
_temporary_result.release_value(); \
})