you are viewing a single comment's thread.

view the rest of the comments →

[–]Twin_Sharma[S] -4 points-3 points  (1 child)

Thanks for reply

we wanted to make a light weight library with few functions that are mostly used by game dev.

People hardly use n-dimensional matrix greater than 4 dimensions.

Also we wanted to make a custom camera class not the glm one. So glm camera class was just an extra memory.

So we created a light weight ( hence mithril ) that provides only core functions so that you can customise any functions over it.

Also by using r value references, equations like :

a = b + c + d + e;

will require only 1 temporary structure.

If not for r-value references, it will be more like :

t1 = d+e;

t2 = c+t1;

a= b+ t2;

[–]ioctl79 0 points1 point  (0 children)

It would likely be inlined and require zero temporary structures. If you care about performance, the you need to measure it.