----- Original Message -----
From: Mathieu Bouchard matju@artengine.ca To: Jonathan Wilkes jancsika@yahoo.com Cc: Roman Haefeli reduzent@gmail.com; PD list pd-list@iem.at Sent: Thursday, December 1, 2011 10:55 AM Subject: Re: [PD] Findings regarding performance
Le 2011-12-01 à 07:00:00, Jonathan Wilkes a écrit :
After looking at d_arithmetic.c, I'm curiouswhy there is
scalartimes_perform and scalartimes_perf8?
One is made for blocksizes at least 8, and the other for blocksizes 1,2,4.
Ok, so perf8 corresponds to "at least 8". Thanks.
Perf8 is a kind of explicit loop-unrolling, coded to greatly reduce the number of conditional jumps when looping a lot on tight loops. Conditional jumps are extremely slow on modern CPUs, and this affects if/else/for/do/while/switch as well as function pointers and virtual function calls.
But there aren't any conditionals inside the loop-- it's just multiplication operators.
-Jonathan
| Mathieu BOUCHARD ----- téléphone : +1.514.383.3801 ----- Montréal, QC