Based-on: [email protected]
("[PATCH 0/6] or1k: Rename the architecture from openrisc")

target_arch() function would reparse target_name() every time if
it was not set to a proper SYS_EMU_TARGET_* value (when using
target-info-stub.c), which is not efficient.

This was found when doing changes to virtio_access_is_big_endian()
function, having an overhead of 50% after switching to runtime checks.
With this, overhead left is around 3%, due to indirect function calls.


r~


Richard Henderson (3):
  qapi: Add hexagon to SysEmuTarget
  meson: Add TARGET_ARCH to config_target_data
  target-info: Statically initialize target_arch

 target-info-stub.c | 2 +-
 target-info.c      | 8 +-------
 meson.build        | 4 +++-
 qapi/machine.json  | 4 +++-
 4 files changed, 8 insertions(+), 10 deletions(-)

-- 
2.43.0


Reply via email to