micro optimisations proposal

This commit is contained in:
David CARLIER 2023-06-10 16:37:54 +01:00 committed by Denis Pauk
parent 8ba435d831
commit 81afaac7bc
2 changed files with 4 additions and 2 deletions

View File

@ -174,6 +174,9 @@ R_SetFrustum(vec3_t vup, vec3_t vpn, vec3_t vright, vec3_t r_origin,
RotatePointAroundVector(frustum[3].normal, vright, vpn, RotatePointAroundVector(frustum[3].normal, vright, vpn,
-(90 - fov_y / 2)); -(90 - fov_y / 2));
#if defined(__GNUC__)
# pragma GCC unroll 4
#endif
for (i = 0; i < 4; i++) for (i = 0; i < 4; i++)
{ {
frustum[i].type = PLANE_ANYZ; frustum[i].type = PLANE_ANYZ;

View File

@ -85,8 +85,7 @@ Mod_Reallocate (void)
R_Printf(PRINT_ALL, "Reallocate space for %d models.\n", models_known_max); R_Printf(PRINT_ALL, "Reallocate space for %d models.\n", models_known_max);
models_known = malloc(models_known_max * sizeof(model_t)); models_known = calloc(models_known_max, sizeof(model_t));
memset(models_known, 0, models_known_max * sizeof(model_t));
} }
/* /*