From a0b600a89c2e6e636579fe727235d036c08c7a9d Mon Sep 17 00:00:00 2001 From: rodri Date: Wed, 29 Nov 2023 21:19:16 +0000 Subject: remove instructions recently added to 9front. implemented some tests. --- bench/main.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'bench/main.c') diff --git a/bench/main.c b/bench/main.c index 060a3d3..6f4886f 100644 --- a/bench/main.c +++ b/bench/main.c @@ -5,6 +5,7 @@ #include "../bench9/b.h" double min(double, double); +double dotvec2_sse(Point2, Point2); double dotvec2_sse4(Point2, Point2); double dotvec2_avx(Point2, Point2); double dotvec3_sse4(Point3, Point3); @@ -64,14 +65,15 @@ static void bdotvec2(int fd) { Bgr g; - B *b0, *b1, *b2; + B *b0, *b1, *b2, *b3; Point2 a, b; int i; benchinitgr(&g, "2d dot product"); b0 = benchadd(&g, "dotvec2"); - b1 = benchadd(&g, "dotvec2_sse4"); - b2 = benchadd(&g, "dotvec2_avx"); + b1 = benchadd(&g, "dotvec2_sse"); + b2 = benchadd(&g, "dotvec2_sse4"); + b3 = benchadd(&g, "dotvec2_avx"); while(b0->n > 0 || b1->n > 0){ a = Vec2(truerand()*frand(), truerand()*frand()); @@ -84,13 +86,18 @@ bdotvec2(int fd) benchin(b1); for(i = 0; i < 1e6; i++) - dotvec2_sse4(a, b); + dotvec2_sse(a, b); benchout(b1); benchin(b2); for(i = 0; i < 1e6; i++) - dotvec2_avx(a, b); + dotvec2_sse4(a, b); benchout(b2); + + benchin(b3); + for(i = 0; i < 1e6; i++) + dotvec2_avx(a, b); + benchout(b3); } benchprintgr(&g, fd); -- cgit v1.2.3