diff --git a/dune/perftool/common/vectorclass.hh b/dune/perftool/common/vectorclass.hh
index 4cdaa97cf99e10391d23894ec38db21f2e037cff..494947f0d80e10e8aca777e04b4ef524839e7baa 100644
--- a/dune/perftool/common/vectorclass.hh
+++ b/dune/perftool/common/vectorclass.hh
@@ -28,17 +28,21 @@ struct base_floatingpoint<Vec4d>
 };
 
 template<>
-struct base_floatingpoint<Vec8d>
+struct base_floatingpoint<Vec8f>
 {
-  using value = double;
+  using value = float;
 };
 
+#if MAX_VECTOR_SIZE >= 512
+
 template<>
-struct base_floatingpoint<Vec8f>
+struct base_floatingpoint<Vec8d>
 {
-  using value = float;
+  using value = double;
 };
 
+#endif
+
 #else
 
 #include <algorithm>