通常来说内存对齐很能提高速度的,使用如下指令在两个操作系统下面令内存对齐
#ifdef _WIN32
typedef __declspec(align(16)) struct
#elif _LINUX
typedef __attribute__((aligned(16))) struct
#endif
这里有一篇讲得很好的文章
http://www.cnblogs.com/flying_bat/archive/2007/11/02/946960.html
转载于:https://my.oschina.net/riseworlds/blog/696577