Tíquete #46487

actions.c: Reduce repetitive action_id_get_target_kind() use

: 2023-01-08 15:33 Última Atualização: 2023-01-18 04:01

Relator:
Dono:
Tipo:
Estado:
Fechado
Componente:
Marcos:
Prioridade:
5 - Medium
Gravidade:
5 - Medium
Resolução:
Fixed
Arquivo:
2

Details

Looking at S3_0. Not sure (not looked in details) if compiler has any chance to deduct that action_id_get_target_kind() calls can be skipped (no side-effects, always returns the same target kind for the same action id), but likely not. This causes at least function call overhead, and may hinder optimization pass in general.

E.g. action in the beginning of is_action_possible() calls action_id_get_target_kind(wanted_action) five times, and more follow in non-assert code.

Ticket History (3/5 Histories)

2023-01-08 15:33 Updated by: cazfi
  • New Ticket "actions.c: Reduce repetitive action_id_get_target_kind() use" created
2023-01-11 09:18 Updated by: cazfi
  • Dono Update from (Nenhum) to cazfi
  • Resolução Update from Nenhum to Accepted
  • Marco Update from (Nenhum) to 3.0.6 (fechado)
2023-01-18 04:01 Updated by: cazfi
  • Estado Update from Aberto to Fechado
  • Resolução Update from Accepted to Fixed

Editar

Please login to add comment to this ticket » Login