By default and following GLSL specifications, vector and matrix default constructors initialize the components to zero. This is a reliable behavior but initialization has a cost and it’s not always necessary.
This behavior can be disabled at compilation time by define GLM\_FORCE\_NO\_CTOR\_INIT before any inclusion of <glm/glm.hpp> or other GLM include.
GLM default behavior:
```cpp
#include<glm/glm.hpp>
void foo()
{
glm::vec4 v; // v is (0.0f, 0.0f, 0.0f, 0.0f)
...
}
```
GLM behavior using GLM\_FORCE\_NO\_CTOR\_INIT:
```cpp
#define GLM_FORCE_NO_CTOR_INIT
#include<glm/glm.hpp>
void foo()
{
glm::vec4 v; // v is filled with garbage
...
}
```
Alternatively, GLM allows to explicitly not initialize a variable: