[eigen] Re: small sums: vectorization not worth it |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: [eigen] Re: small sums: vectorization not worth it
- From: "Benoit Jacob" <jacob.benoit.1@xxxxxxxxx>
- Date: Fri, 16 Jan 2009 23:32:26 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=h5/7/UkB05z4uQDEMaeW67MlZUZj782Exriu0E7iXqQ=; b=fhrG9XqoqD3GF+Xdr7uKCxwIaO5wwluibowAF4wuzlSvjSXg1rpMbQngGiyLY4+953 WM2JCAr/Um0NxyXBy07OviwVfaTkAetzE/Lhs4Rv+MvsEPOpePnvd0zBWhCN8/lFLvWi wRIMqOz10dN4pRQGJw3wgyiN1pZ7Qrk4jA+LU=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=n1RNdH+RYDsocQtVYQ3PtBNST8yaUrBAt+pfMmbNTbUACekeNql10P7R+zNVHe2POb 5bfyPy+DfLVWRNmQ+TBGXk+6ogpPml7JqEBSTaacKfqUe6hnCjdpn3TsBCq7lO5vGqVs T0/2e9/gXziO/doPvJdrTssReXc188j4PQ0ak=
Note: i think the old heuristic was wrong anyway.
Maybe take this occasion to introduce a EIGEN_COST_OF_PREDUX (since
this cost depends greatly on the simd platform) ?
And then do a natural heuristic rather than a quick hack like we used to have?
Benoit
2009/1/16 Benoit Jacob <jacob.benoit.1@xxxxxxxxx>:
> Hi Gael *cough* List,
>
> ei_predux is costly because it consists of >1 SIMD instruction.
>
> So until recently we had sum() only vectorize if the size was big enough.
> However this was recently changed.
>
> Attached is a benchmark that runs 2.5x slower with SSE (2 or 3) than
> without. It's just Vector2d::sum().
>
> So, revert to old behavior?
>
> Moreover: matrix product innerVectorization also uses a ei_predux. Same here?
>
> Cheers,
> Benoit
>