Print this page
3741 zfs needs better comments
Submitted by: Will Andrews <willa@spectralogic.com>
Submitted by: Justin Gibbs <justing@spectralogic.com>
Submitted by: Alan Somers <alans@spectralogic.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
*** 123,132 ****
--- 123,143 ----
*
* For both cached and uncached data, both fletcher checksums are much faster
* than sha-256, and slower than 'off', which doesn't touch the data at all.
*/
+ /*
+ * TODO: vectorize these functions
+ * All of these functions are written so that each iteration of the loop
+ * depends on the value of the previous iteration. Also, in the fletcher_4
+ * functions, each statement of the loop body depends on the previous
+ * statement. These dependencies prevent the compiler from vectorizing the
+ * code to take advantage of SIMD extensions (unless GCC is far smarter than I
+ * think). It would be easy to rewrite the loops to be amenable to
+ * autovectorization.
+ */
+
#include <sys/types.h>
#include <sys/sysmacros.h>
#include <sys/byteorder.h>
#include <sys/zio.h>
#include <sys/spa.h>