-ffast-math is the most important optimization here: update 20% faster
mcl_LIBS = robomath m
include_HEADERS = mcl.h
+
+# -ffast-math is the most important optimization here
+CFLAGS := $(filter-out -fno-strict-aliasing,$(CFLAGS)) --std=c99 -D_GNU_SOURCE -fgnu89-inline -ffast-math -O3 -funroll-loops -ftree-vectorize
#endif
void mcl_update2(struct mcl_model *mcl, void *data)
{
- struct mcl_particle *parts = (struct mcl_particle *)mcl->parts;
- struct mcl_angles *angles = (struct mcl_angles*)data;
+ struct mcl_particle * restrict parts = (struct mcl_particle *)mcl->parts;
+ const struct mcl_angles *angles = (struct mcl_angles*)data;
mcl_thetas theta;
double p[mcl->beacon_cnt], p1;
int i, it, im;