Open aqilc opened 1 year ago
Modern compilers are indeed has faster functions than my own functions. I agree with that. But it is just a fun project. Or at least if you're writing a kernel, you MUST use codes that written in zero like these instead of using system or compiler functions to create your kernel. Like fdlibm does. So again, it is a fun project. And plus, it was written for École 42 school to show students that they also can create stuff like these.
That is cool, fun is all you can ask for. I still wonder if this library can actually stack up performance-wise, and if you should use platform specific instructions when they exist, or builtins for that matter. While it's true that you can't use stdlib's math.h for writing kernels, you would use a whole C STDLIB implementation instead of just specific parts like this math library, or just port glib.
How does this library compare to the original
math.h
s in MSVC, MinGW, and Linux CSTDLibs? It looks like you used many bit tricks and optimized this library extensively yourself, but I wonder if it's stopping compiler optimizations or if it can really replace native CSTDmath.h
libraries in places where performance matters.