laser,move,projectile: annotate hot paths

This commit is contained in:
Andrei Alexeyev 2023-09-23 21:01:40 +02:00
parent 4592212b06
commit ef92ee12fc
No known key found for this signature in database
GPG key ID: 72D26128040B9690
3 changed files with 3 additions and 2 deletions

View file

@ -174,6 +174,7 @@ static void laserseg_flip(LaserSegment *s) {
SWAP(s->width.a, s->width.b);
}
attr_hot
static int quantize_laser(Laser *l) {
// Break the laser curve into small line segments, simplify and cull them,
// compute the bounding box.

View file

@ -20,7 +20,7 @@ typedef struct MoveParams {
real attraction_exponent;
} MoveParams;
cmplx move_update(cmplx *restrict pos, MoveParams *restrict params);
cmplx move_update(cmplx *restrict pos, MoveParams *restrict params) attr_hot attr_nonnull_all;
cmplx move_update_multiple(uint times, cmplx *restrict pos, MoveParams *restrict params);
INLINE MoveParams move_next(cmplx pos, MoveParams move) {

View file

@ -239,7 +239,7 @@ void calc_projectile_collision(Projectile *p, ProjCollisionResult *out_col) attr
void apply_projectile_collision(ProjectileList *projlist, Projectile *p, ProjCollisionResult *col) attr_nonnull_all;
int trace_projectile(Projectile *p, ProjCollisionResult *out_col, ProjCollisionType stopflags, int timeofs) attr_nonnull_all;
bool projectile_in_viewport(Projectile *proj) attr_nonnull_all;
void process_projectiles(ProjectileList *projlist, bool collision) attr_nonnull_all;
void process_projectiles(ProjectileList *projlist, bool collision) attr_hot attr_nonnull_all;
bool projectile_is_clearable(Projectile *p) attr_nonnull_all;
Projectile *spawn_projectile_collision_effect(Projectile *proj) attr_nonnull_all;