2011-07-28 14:26:00 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Copyright 2011 Google Inc.
|
|
|
|
*
|
|
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
|
|
* found in the LICENSE file.
|
|
|
|
*/
|
2011-06-01 15:11:22 +00:00
|
|
|
#include "SkBenchmark.h"
|
|
|
|
#include "SkMatrix.h"
|
<body onunload="M_unloadPage();">
<!-- Begin help window -->
<script type="text/javascript"><!--
var xsrfToken = 'dd5d1a57ca1d5440593050fdc596d377';
var helpDisplayed = false;
document.onclick = M_clickCommon;
var media_url = "/static/";
var base_url = "/";
var publish_link = "/4571045/publish";
// -->
</script>
<div id="help" style="display: none;">
<div style="font-size: medium; text-align: center;">Keyboard Shortcuts</div>
<hr>
<table width="100%">
<tbody><tr valign="top">
<td>
<table width="100%">
<tbody><tr>
<td></td><th>File</th>
</tr>
<tr>
<td class="shortcut"><span class="letter">u</span> <b>:</b></td><td>up to issue</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">m</span> <b>:</b></td><td>publish + mail comments</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">M</span> <b>:</b></td><td>edit review message</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">j</span> / <span class="letter">k</span> <b>:</b></td><td>jump to file after / before current file</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">J</span> / <span class="letter">K</span> <b>:</b></td><td>jump to next file with a comment after / before current file</td>
</tr>
<tr>
<td></td><th>Side-by-side diff</th>
</tr>
<tr>
<td class="shortcut"><span class="letter">i</span> <b>:</b></td><td>toggle intra-line diffs</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">e</span> <b>:</b></td><td>expand all comments</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">c</span> <b>:</b></td><td>collapse all comments</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">s</span> <b>:</b></td><td>toggle showing all comments</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">n</span> / <span class="letter">p</span> <b>:</b></td><td>next / previous diff chunk or comment</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">N</span> / <span class="letter">P</span> <b>:</b></td><td>next / previous comment</td>
</tr>
<tr>
<td class="shortcut"><span class="letter"><Enter></span> <b>:</b></td><td>respond to / edit current comment</td>
</tr>
</tbody></table>
</td>
<td>
<table width="100%">
<tbody><tr>
<td></td><th>Issue</th>
</tr>
<tr>
<td class="shortcut"><span class="letter">u</span> <b>:</b></td><td>up to list of issues</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">m</span> <b>:</b></td><td>publish + mail comments</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">j</span> / <span class="letter">k</span> <b>:</b></td><td>jump to patch after / before current patch</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">o</span> / <span class="letter"><Enter></span> <b>:</b></td><td>open current patch in side-by-side view</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">i</span> <b>:</b></td><td>open current patch in unified diff view</td>
</tr>
<tr><td> </td></tr>
<tr><td></td><th>Issue List</th></tr>
<tr>
<td class="shortcut"><span class="letter">j</span> / <span class="letter">k</span> <b>:</b></td><td>jump to issue after / before current issue</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">o</span> / <span class="letter"><Enter></span> <b>:</b></td><td>open current issue</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">#</span> <b>:</b></td>
<td>close issue</td>
</tr>
<tr><td> </td></tr>
<tr>
<td></td><th>Comment/message editing</th>
</tr>
<tr>
<td class="shortcut"><span class="letter"><Ctrl></span> + <span class="letter">s</span> <b>:</b></td><td>save comment</td>
</tr>
<tr>
<td class="shortcut"><span class="letter"><Esc></span> <b>:</b></td><td>cancel edit</td>
</tr>
</tbody></table>
</td>
</tr>
</tbody></table>
</div>
<!-- End help window -->
<div align="right">
<div style="float:left; font-weight:bold"><i>Rietveld</i> Code Review Tool</div>
<b>tomhudson@google.com (TomH)</b>
|
<a class="novisit" href="/settings">Settings</a>
|
<a class="novisit" target="_blank" href="http://code.google.com/p/rietveld/wiki/CodeReviewHelp">Help</a>
|
<a class="novisit" target="_blank" href="http://code.google.com/p/rietveld/issues/list">Bug tracker</a>
|
<a class="novisit" target="_blank" href="http://groups.google.com/group/codereview-discuss">Discussion group</a>
|
<a class="novisit" target="_blank" href="http://code.google.com/p/rietveld">Source code</a>
|
<a class="novisit" href="http://codereview.appspot.com/_ah/logout?continue=https://www.google.com/accounts/Logout%3Fcontinue%3Dhttps://appengine.google.com/_ah/logout%253Fcontinue%253Dhttp://codereview.appspot.com/4571045/%26service%3Dah">Sign out</a>
</div>
<div class="counter">(691)</div>
<div class="mainmenu">
<a href="/" class="active">Issues</a>
<a href="/repos">Repositories</a>
<a href="/search">Search</a>
</div>
<div class="mainmenu2">
<a href="/use_uploadpy">Create Issue</a>
|
<a href="/mine">My Issues</a>
|
<a href="/starred">Starred</a>
|
<a href="/all">Open</a>
|
<a href="/all?closed=1">All</a>
</div>
<div>
<h2>
<span id="issue-star-4571045">
<a href="javascript:M_addIssueStar(4571045)">
<img src="/static/star-dark.gif" width="15" height="15" border="0"></a>
</span>
<span class="issue-close" id="issue-close-4571045">
<a href="javascript:M_closeIssue(4571045)">
<img src="/static/close.gif" title="Close This Issue" width="15" height="15" border="0"></a>
</span>
Issue <a href="/4571045/" onmouseover="M_showPopUp(this, 'popup-issue');">
4571045</a>:
New matrix benchmarks to evaluate ::setConcat implementation options
</h2>
<table class="issue-details" border="0" width="100%">
<tbody><tr valign="top">
<td class="meta" width="20%">
<div>
<a class="novisit" href="/4571045/edit">
Edit Issue
</a>
<br>
<a class="novisit" href="/4571045/publish">
Publish+Mail Comments
</a> ('m')
<br>
<a class="novisit" href="/4571045/diff/1/bench/MatrixBench.cpp">
<b>Start Review</b>
</a>
</div>
<div class="issue_details_sidebar">
<div><b>Created:</b><br>
16 minutes ago by me
</div>
<div><b>Modified:</b><br>
0 minutes ago
</div>
<div><b>Reviewers:</b><br>
<a href="/user/reed1" onmouseover="M_showUserInfoPopup(this)">reed1</a>
</div>
<div><b>CC:</b><br>
</div>
<div><b>Base URL:</b><br>
http://skia.googlecode.com/svn/trunk/
</div>
<div><b>Visibility:</b><br>
Public.
</div>
</div>
</td>
<td style="padding-left: .8em; padding-right: .8em;" width="80%">
<h3><a id="issue-description-pointer" href="javascript:M_toggleSection('issue-description')" class="toggled-section opentriangle">
Description</a></h3>
<div id="issue-description" style="margin-left:15px;">
<pre>On platforms that use Float (instead of Fixed), SkMatrix stores its internal
values as floats, but setConcat() needs extra precision and so uses doubles to
contain intermediate values.
These three benchmarks compare the speed of float-only, double-only, and
float-cast-to-double implementations of a chunk of code extracted from the
non-perspective case of setConcat().
</pre>
</div>
<h3>
<a id="ps-1-pointer" href="javascript:M_toggleSectionForPS('4571045', '1')" class="toggled-section opentriangle">
Patch Set 1
</a>
</h3>
<div id="ps-1" style="">
<div class="issue-list">
<div class="pagination">
<div style="float: left;">
<i>Created:</i> 16 minutes ago
</div>
<div style="float: right;">
<a href="/download/issue4571045_1.diff">
Download raw patch set</a>
</div>
<div style="clear:both;"></div>
</div>
<table id="queues" style="clear:both;">
<tbody><tr align="left">
<th colspan="2"></th>
<th>Unified diffs</th>
<th>Side-by-side diffs</th>
<th>Delta from patch set</th>
<th colspan="3">Stats</th>
<th>Patch</th>
</tr>
<tr name="patch">
<td class="first" width="14"><img src="/static/closedtriangle.gif" style="" width="12" height="9"></td>
<td style="white-space: nowrap">M </td>
<td>
<a class="noul" href="/4571045/patch/1/2">
bench/MatrixBench.cpp
</a>
</td>
<td>
<a class="noul" href="/4571045/diff/1/bench/MatrixBench.cpp">
View
</a>
</td>
<td style="white-space: nowrap">
</td>
<td style="white-space: nowrap">4 chunks</td>
<td style="white-space: nowrap">+114 lines, -3 lines</td>
<td style="white-space: nowrap">
0 comments
</td>
<td>
<a href="/download/issue4571045_1_2.diff" title="Download patch for bench/MatrixBench.cpp">
Download
</a>
</td>
</tr>
</tbody></table>
</div>
</div>
<h3>
<a id="messages-pointer" href="javascript:M_toggleSection('messages')" class="toggled-section opentriangle">
Messages
</a>
</h3>
<div><i>Total messages: 3</i></div>
<div id="messages">
<div style="margin-bottom: .5em;">
<a href="javascript:M_showAllComments('cl', 3)">
Expand All Messages</a>
|
<a href="javascript:M_hideAllComments('cl', 3)">
Collapse All Messages</a>
</div>
<div class="message " id="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UY6QcM" name="0">
<a name="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UY6QcM"></a>
<div class="header">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tbody><tr class="comment_title" onclick="M_switchChangelistComment(0)">
<td style="padding-left: 5px; white-space: nowrap;">
<b>me</b>
</td>
<td width="100%">
<table style="table-layout:fixed; white-space: nowrap;" width="100%">
<tbody><tr>
<td>
<div style="white-space: nowrap; overflow: hidden;" class="extra" id="cl-preview-0">
</div>
</td>
</tr>
</tbody></table>
</td>
<td align="right" style="white-space: nowrap; padding-right: 5px;">
13 minutes ago
</td>
</tr>
</tbody></table>
</div>
<div id="cl-comment-0" style="display: none;">
<div class="message-body">
<pre name="cl-message-0"></pre>
</div>
<div class="message-actions">
<a href="javascript:M_replyToMessage('0', '2011/06/03 18:57:35', 'TomH')" id="message-reply-href-0">Reply</a>
<textarea rows="7" cols="70" name="message" style="display:none"></textarea>
<div id="message-reply-0" style="display:none;"></div>
</div>
</div>
</div>
<div class="message " id="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UY0Q8M" name="1">
<a name="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UY0Q8M"></a>
<div class="header">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tbody><tr class="comment_title" onclick="M_switchChangelistComment(1)">
<td style="padding-left: 5px; white-space: nowrap;">
<b>reed1</b>
</td>
<td width="100%">
<table style="table-layout:fixed; white-space: nowrap;" width="100%">
<tbody><tr>
<td>
<div style="white-space: nowrap; overflow: hidden;" class="extra" id="cl-preview-1">
1. lets remove the "fix" from the function name. just muladdmul I think 2. we ...
</div>
</td>
</tr>
</tbody></table>
</td>
<td align="right" style="white-space: nowrap; padding-right: 5px;">
10 minutes ago
</td>
</tr>
</tbody></table>
</div>
<div id="cl-comment-1" style="display: none;">
<div class="message-body">
<pre name="cl-message-1">1. lets remove the "fix" from the function name. just muladdmul I think
2. we can remove the return, since it will be compiled away anyway
3. nice checkin comment!
4. what are the results like?</pre>
</div>
<div class="message-actions">
<a href="javascript:M_replyToMessage('1', '2011/06/03 19:00:39', 'reed1')" id="message-reply-href-1">Reply</a>
<textarea rows="7" cols="70" name="message" style="display:none"></textarea>
<div id="message-reply-1" style="display:none;"></div>
</div>
</div>
</div>
<div class="message " id="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UYuRcM" name="2">
<a name="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UYuRcM"></a>
<div class="header">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tbody><tr class="comment_title" onclick="M_switchChangelistComment(2)">
<td style="padding-left: 5px; white-space: nowrap;">
<b>me</b>
</td>
<td width="100%">
<table style="table-layout:fixed; white-space: nowrap;" width="100%">
<tbody><tr>
<td>
<div style="white-space: nowrap; overflow: hidden; visibility: hidden;" class="extra" id="cl-preview-2">
> 4. what are the results like? For posterity: tomhudson@tomhudson-zx600-linux:/usr/local/google/src/skia3$ out/bench/bench -match matrix_concat -repeat 1000 ...
</div>
</td>
</tr>
</tbody></table>
</td>
<td align="right" style="white-space: nowrap; padding-right: 5px;">
0 minutes ago
</td>
</tr>
</tbody></table>
</div>
<div id="cl-comment-2">
<div class="message-body">
<pre name="cl-message-2">> 4. what are the results like?
For posterity:
tomhudson@tomhudson-zx600-linux:/usr/local/google/src/skia3$ out/bench/bench
-match matrix_concat -repeat 1000
skia bench: alpha=0xFF antialias=1 filter=0
running bench [640 480] matrix_concat_double 8888: msecs = 0.79 565:
msecs = 0.79 GPU: msecs = 0.79
running bench [640 480] matrix_concat_floatdouble 8888: msecs = 0.97 565:
msecs = 0.97 GPU: msecs = 0.97
running bench [640 480] matrix_concat_float 8888: msecs = 0.74 565:
msecs = 0.73 GPU: msecs = 0.74</pre>
</div>
<div class="message-actions">
<a href="javascript:M_replyToMessage('2', '2011/06/03 19:11:06', 'TomH')" id="message-reply-href-2">Reply</a>
<textarea rows="7" cols="70" name="message" style="display:none"></textarea>
<div id="message-reply-2" style="display:none;"></div>
</div>
</div>
</div>
<div>
<a href="javascript:M_showAllComments('cl', 3)">
Expand All Messages</a>
|
<a href="javascript:M_hideAllComments('cl', 3)">
Collapse All Messages</a>
</div>
</div>
<script language="JavaScript" type="text/javascript">
<!--
document.onkeydown = M_changelistKeyDown;
var dashboardState = new M_DashboardState(window, 'patch', 'M_CLPatchMarker');
M_switchChangelistCommentByAnchor();
// -->
</script>
<div style="display:none;">
<form method="POST" action="/4571045/publish" id="message-reply-form">
<input type="hidden" name="xsrf_token" value="dd5d1a57ca1d5440593050fdc596d377">
<div></div>
<input type="hidden" name="subject" value="New matrix benchmarks to evaluate ::setConcat implementation options">
<input type="hidden" name="message_only" value="1">
<input type="submit" value="Send Message">
<input type="button" value="Discard" name="discard">
<input type="checkbox" name="send_mail" value="1" id="message-reply-send-mail" checked="checked">
<label>Send mail to reviewers</label>
</form>
</div>
<a id="resizer" class="resizer" style="display:none;cursor:pointer">
<img src="/static/zippyplus.gif">
</a>
</td>
</tr>
</tbody></table>
</div>
<div class="popup" id="popup-issue" style="left: 104px; top: 116px; visibility: hidden; ">
<b>Issue 4571045: New matrix benchmarks to evaluate ::setConcat implementation options
</b><br>
Created 16 minutes ago by me<br>
Modified 0 minutes ago<br>
Reviewers: reed1<br>
Base URL: http://skia.googlecode.com/svn/trunk/<br>
Comments: 0
</div>
<p></p>
<div style="float: left;">
<a target="_blank" href="http://code.google.com/appengine/"><img border="0" src="/static/appengine-noborder-120x30.gif" alt="Powered by Google App Engine"></a>
</div>
<div class="extra" style="font-size: 9pt; float: right; text-align: right;">
<div style="height:14px;">
<img src="/static/rss.gif" alt="RSS Feeds" width="14" height="14" align="top">
<a href="/rss/all">Recent Issues</a>
|
<a href="/rss/mine/TomH">My Issues</a>
|
<a href="/rss/reviews/TomH">My Reviews</a>
|
<a href="/rss/closed/TomH">My Closed</a>
|
<a href="/rss/issue/4571045">This issue</a>
</div>
<div style="margin-top: .3em;">This is Rietveld <a href="http://code.google.com/p/rietveld/updates/list">r756
</a></div>
</div>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script><script src="http://www.google-analytics.com/ga.js" type="text/javascript"></script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-4803694-4");
pageTracker._initData();
pageTracker._trackPageview();
</script>
On platforms that use Float (instead of Fixed), SkMatrix stores its internal
values as floats, but setConcat() needs extra precision and so uses doubles
to contain intermediate values.
These three benchmarks compare the speed of float-only, double-only, and
float-cast-to-double implementations of a chunk of code extracted from the
non-perspective case of setConcat().
git-svn-id: http://skia.googlecode.com/svn/trunk@1497 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-06-03 19:16:56 +00:00
|
|
|
#include "SkRandom.h"
|
2011-06-01 15:11:22 +00:00
|
|
|
#include "SkString.h"
|
|
|
|
|
|
|
|
class MatrixBench : public SkBenchmark {
|
|
|
|
SkString fName;
|
|
|
|
enum { N = 100000 };
|
|
|
|
public:
|
|
|
|
MatrixBench(void* param, const char name[]) : INHERITED(param) {
|
|
|
|
fName.printf("matrix_%s", name);
|
2012-09-13 15:50:24 +00:00
|
|
|
fIsRendering = false;
|
2011-06-01 15:11:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
virtual void performTest() = 0;
|
|
|
|
|
|
|
|
protected:
|
2011-06-06 13:31:30 +00:00
|
|
|
virtual int mulLoopCount() const { return 1; }
|
|
|
|
|
2011-06-01 15:11:22 +00:00
|
|
|
virtual const char* onGetName() {
|
|
|
|
return fName.c_str();
|
|
|
|
}
|
|
|
|
|
2013-03-05 18:50:01 +00:00
|
|
|
virtual void onDraw(SkCanvas*) {
|
2011-10-28 15:34:49 +00:00
|
|
|
int n = SkBENCHLOOP(N * this->mulLoopCount());
|
2011-06-06 13:31:30 +00:00
|
|
|
for (int i = 0; i < n; i++) {
|
2011-06-01 15:11:22 +00:00
|
|
|
this->performTest();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
private:
|
|
|
|
typedef SkBenchmark INHERITED;
|
|
|
|
};
|
|
|
|
|
|
|
|
// we want to stop the compiler from eliminating code that it thinks is a no-op
|
|
|
|
// so we have a non-static global we increment, hoping that will convince the
|
|
|
|
// compiler to execute everything
|
|
|
|
int gMatrixBench_NonStaticGlobal;
|
|
|
|
|
|
|
|
#define always_do(pred) \
|
|
|
|
do { \
|
|
|
|
if (pred) { \
|
|
|
|
++gMatrixBench_NonStaticGlobal; \
|
|
|
|
} \
|
|
|
|
} while (0)
|
|
|
|
|
|
|
|
class EqualsMatrixBench : public MatrixBench {
|
|
|
|
public:
|
|
|
|
EqualsMatrixBench(void* param) : INHERITED(param, "equals") {}
|
|
|
|
protected:
|
|
|
|
virtual void performTest() {
|
|
|
|
SkMatrix m0, m1, m2;
|
<body onunload="M_unloadPage();">
<!-- Begin help window -->
<script type="text/javascript"><!--
var xsrfToken = 'dd5d1a57ca1d5440593050fdc596d377';
var helpDisplayed = false;
document.onclick = M_clickCommon;
var media_url = "/static/";
var base_url = "/";
var publish_link = "/4571045/publish";
// -->
</script>
<div id="help" style="display: none;">
<div style="font-size: medium; text-align: center;">Keyboard Shortcuts</div>
<hr>
<table width="100%">
<tbody><tr valign="top">
<td>
<table width="100%">
<tbody><tr>
<td></td><th>File</th>
</tr>
<tr>
<td class="shortcut"><span class="letter">u</span> <b>:</b></td><td>up to issue</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">m</span> <b>:</b></td><td>publish + mail comments</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">M</span> <b>:</b></td><td>edit review message</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">j</span> / <span class="letter">k</span> <b>:</b></td><td>jump to file after / before current file</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">J</span> / <span class="letter">K</span> <b>:</b></td><td>jump to next file with a comment after / before current file</td>
</tr>
<tr>
<td></td><th>Side-by-side diff</th>
</tr>
<tr>
<td class="shortcut"><span class="letter">i</span> <b>:</b></td><td>toggle intra-line diffs</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">e</span> <b>:</b></td><td>expand all comments</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">c</span> <b>:</b></td><td>collapse all comments</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">s</span> <b>:</b></td><td>toggle showing all comments</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">n</span> / <span class="letter">p</span> <b>:</b></td><td>next / previous diff chunk or comment</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">N</span> / <span class="letter">P</span> <b>:</b></td><td>next / previous comment</td>
</tr>
<tr>
<td class="shortcut"><span class="letter"><Enter></span> <b>:</b></td><td>respond to / edit current comment</td>
</tr>
</tbody></table>
</td>
<td>
<table width="100%">
<tbody><tr>
<td></td><th>Issue</th>
</tr>
<tr>
<td class="shortcut"><span class="letter">u</span> <b>:</b></td><td>up to list of issues</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">m</span> <b>:</b></td><td>publish + mail comments</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">j</span> / <span class="letter">k</span> <b>:</b></td><td>jump to patch after / before current patch</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">o</span> / <span class="letter"><Enter></span> <b>:</b></td><td>open current patch in side-by-side view</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">i</span> <b>:</b></td><td>open current patch in unified diff view</td>
</tr>
<tr><td> </td></tr>
<tr><td></td><th>Issue List</th></tr>
<tr>
<td class="shortcut"><span class="letter">j</span> / <span class="letter">k</span> <b>:</b></td><td>jump to issue after / before current issue</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">o</span> / <span class="letter"><Enter></span> <b>:</b></td><td>open current issue</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">#</span> <b>:</b></td>
<td>close issue</td>
</tr>
<tr><td> </td></tr>
<tr>
<td></td><th>Comment/message editing</th>
</tr>
<tr>
<td class="shortcut"><span class="letter"><Ctrl></span> + <span class="letter">s</span> <b>:</b></td><td>save comment</td>
</tr>
<tr>
<td class="shortcut"><span class="letter"><Esc></span> <b>:</b></td><td>cancel edit</td>
</tr>
</tbody></table>
</td>
</tr>
</tbody></table>
</div>
<!-- End help window -->
<div align="right">
<div style="float:left; font-weight:bold"><i>Rietveld</i> Code Review Tool</div>
<b>tomhudson@google.com (TomH)</b>
|
<a class="novisit" href="/settings">Settings</a>
|
<a class="novisit" target="_blank" href="http://code.google.com/p/rietveld/wiki/CodeReviewHelp">Help</a>
|
<a class="novisit" target="_blank" href="http://code.google.com/p/rietveld/issues/list">Bug tracker</a>
|
<a class="novisit" target="_blank" href="http://groups.google.com/group/codereview-discuss">Discussion group</a>
|
<a class="novisit" target="_blank" href="http://code.google.com/p/rietveld">Source code</a>
|
<a class="novisit" href="http://codereview.appspot.com/_ah/logout?continue=https://www.google.com/accounts/Logout%3Fcontinue%3Dhttps://appengine.google.com/_ah/logout%253Fcontinue%253Dhttp://codereview.appspot.com/4571045/%26service%3Dah">Sign out</a>
</div>
<div class="counter">(691)</div>
<div class="mainmenu">
<a href="/" class="active">Issues</a>
<a href="/repos">Repositories</a>
<a href="/search">Search</a>
</div>
<div class="mainmenu2">
<a href="/use_uploadpy">Create Issue</a>
|
<a href="/mine">My Issues</a>
|
<a href="/starred">Starred</a>
|
<a href="/all">Open</a>
|
<a href="/all?closed=1">All</a>
</div>
<div>
<h2>
<span id="issue-star-4571045">
<a href="javascript:M_addIssueStar(4571045)">
<img src="/static/star-dark.gif" width="15" height="15" border="0"></a>
</span>
<span class="issue-close" id="issue-close-4571045">
<a href="javascript:M_closeIssue(4571045)">
<img src="/static/close.gif" title="Close This Issue" width="15" height="15" border="0"></a>
</span>
Issue <a href="/4571045/" onmouseover="M_showPopUp(this, 'popup-issue');">
4571045</a>:
New matrix benchmarks to evaluate ::setConcat implementation options
</h2>
<table class="issue-details" border="0" width="100%">
<tbody><tr valign="top">
<td class="meta" width="20%">
<div>
<a class="novisit" href="/4571045/edit">
Edit Issue
</a>
<br>
<a class="novisit" href="/4571045/publish">
Publish+Mail Comments
</a> ('m')
<br>
<a class="novisit" href="/4571045/diff/1/bench/MatrixBench.cpp">
<b>Start Review</b>
</a>
</div>
<div class="issue_details_sidebar">
<div><b>Created:</b><br>
16 minutes ago by me
</div>
<div><b>Modified:</b><br>
0 minutes ago
</div>
<div><b>Reviewers:</b><br>
<a href="/user/reed1" onmouseover="M_showUserInfoPopup(this)">reed1</a>
</div>
<div><b>CC:</b><br>
</div>
<div><b>Base URL:</b><br>
http://skia.googlecode.com/svn/trunk/
</div>
<div><b>Visibility:</b><br>
Public.
</div>
</div>
</td>
<td style="padding-left: .8em; padding-right: .8em;" width="80%">
<h3><a id="issue-description-pointer" href="javascript:M_toggleSection('issue-description')" class="toggled-section opentriangle">
Description</a></h3>
<div id="issue-description" style="margin-left:15px;">
<pre>On platforms that use Float (instead of Fixed), SkMatrix stores its internal
values as floats, but setConcat() needs extra precision and so uses doubles to
contain intermediate values.
These three benchmarks compare the speed of float-only, double-only, and
float-cast-to-double implementations of a chunk of code extracted from the
non-perspective case of setConcat().
</pre>
</div>
<h3>
<a id="ps-1-pointer" href="javascript:M_toggleSectionForPS('4571045', '1')" class="toggled-section opentriangle">
Patch Set 1
</a>
</h3>
<div id="ps-1" style="">
<div class="issue-list">
<div class="pagination">
<div style="float: left;">
<i>Created:</i> 16 minutes ago
</div>
<div style="float: right;">
<a href="/download/issue4571045_1.diff">
Download raw patch set</a>
</div>
<div style="clear:both;"></div>
</div>
<table id="queues" style="clear:both;">
<tbody><tr align="left">
<th colspan="2"></th>
<th>Unified diffs</th>
<th>Side-by-side diffs</th>
<th>Delta from patch set</th>
<th colspan="3">Stats</th>
<th>Patch</th>
</tr>
<tr name="patch">
<td class="first" width="14"><img src="/static/closedtriangle.gif" style="" width="12" height="9"></td>
<td style="white-space: nowrap">M </td>
<td>
<a class="noul" href="/4571045/patch/1/2">
bench/MatrixBench.cpp
</a>
</td>
<td>
<a class="noul" href="/4571045/diff/1/bench/MatrixBench.cpp">
View
</a>
</td>
<td style="white-space: nowrap">
</td>
<td style="white-space: nowrap">4 chunks</td>
<td style="white-space: nowrap">+114 lines, -3 lines</td>
<td style="white-space: nowrap">
0 comments
</td>
<td>
<a href="/download/issue4571045_1_2.diff" title="Download patch for bench/MatrixBench.cpp">
Download
</a>
</td>
</tr>
</tbody></table>
</div>
</div>
<h3>
<a id="messages-pointer" href="javascript:M_toggleSection('messages')" class="toggled-section opentriangle">
Messages
</a>
</h3>
<div><i>Total messages: 3</i></div>
<div id="messages">
<div style="margin-bottom: .5em;">
<a href="javascript:M_showAllComments('cl', 3)">
Expand All Messages</a>
|
<a href="javascript:M_hideAllComments('cl', 3)">
Collapse All Messages</a>
</div>
<div class="message " id="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UY6QcM" name="0">
<a name="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UY6QcM"></a>
<div class="header">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tbody><tr class="comment_title" onclick="M_switchChangelistComment(0)">
<td style="padding-left: 5px; white-space: nowrap;">
<b>me</b>
</td>
<td width="100%">
<table style="table-layout:fixed; white-space: nowrap;" width="100%">
<tbody><tr>
<td>
<div style="white-space: nowrap; overflow: hidden;" class="extra" id="cl-preview-0">
</div>
</td>
</tr>
</tbody></table>
</td>
<td align="right" style="white-space: nowrap; padding-right: 5px;">
13 minutes ago
</td>
</tr>
</tbody></table>
</div>
<div id="cl-comment-0" style="display: none;">
<div class="message-body">
<pre name="cl-message-0"></pre>
</div>
<div class="message-actions">
<a href="javascript:M_replyToMessage('0', '2011/06/03 18:57:35', 'TomH')" id="message-reply-href-0">Reply</a>
<textarea rows="7" cols="70" name="message" style="display:none"></textarea>
<div id="message-reply-0" style="display:none;"></div>
</div>
</div>
</div>
<div class="message " id="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UY0Q8M" name="1">
<a name="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UY0Q8M"></a>
<div class="header">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tbody><tr class="comment_title" onclick="M_switchChangelistComment(1)">
<td style="padding-left: 5px; white-space: nowrap;">
<b>reed1</b>
</td>
<td width="100%">
<table style="table-layout:fixed; white-space: nowrap;" width="100%">
<tbody><tr>
<td>
<div style="white-space: nowrap; overflow: hidden;" class="extra" id="cl-preview-1">
1. lets remove the "fix" from the function name. just muladdmul I think 2. we ...
</div>
</td>
</tr>
</tbody></table>
</td>
<td align="right" style="white-space: nowrap; padding-right: 5px;">
10 minutes ago
</td>
</tr>
</tbody></table>
</div>
<div id="cl-comment-1" style="display: none;">
<div class="message-body">
<pre name="cl-message-1">1. lets remove the "fix" from the function name. just muladdmul I think
2. we can remove the return, since it will be compiled away anyway
3. nice checkin comment!
4. what are the results like?</pre>
</div>
<div class="message-actions">
<a href="javascript:M_replyToMessage('1', '2011/06/03 19:00:39', 'reed1')" id="message-reply-href-1">Reply</a>
<textarea rows="7" cols="70" name="message" style="display:none"></textarea>
<div id="message-reply-1" style="display:none;"></div>
</div>
</div>
</div>
<div class="message " id="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UYuRcM" name="2">
<a name="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UYuRcM"></a>
<div class="header">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tbody><tr class="comment_title" onclick="M_switchChangelistComment(2)">
<td style="padding-left: 5px; white-space: nowrap;">
<b>me</b>
</td>
<td width="100%">
<table style="table-layout:fixed; white-space: nowrap;" width="100%">
<tbody><tr>
<td>
<div style="white-space: nowrap; overflow: hidden; visibility: hidden;" class="extra" id="cl-preview-2">
> 4. what are the results like? For posterity: tomhudson@tomhudson-zx600-linux:/usr/local/google/src/skia3$ out/bench/bench -match matrix_concat -repeat 1000 ...
</div>
</td>
</tr>
</tbody></table>
</td>
<td align="right" style="white-space: nowrap; padding-right: 5px;">
0 minutes ago
</td>
</tr>
</tbody></table>
</div>
<div id="cl-comment-2">
<div class="message-body">
<pre name="cl-message-2">> 4. what are the results like?
For posterity:
tomhudson@tomhudson-zx600-linux:/usr/local/google/src/skia3$ out/bench/bench
-match matrix_concat -repeat 1000
skia bench: alpha=0xFF antialias=1 filter=0
running bench [640 480] matrix_concat_double 8888: msecs = 0.79 565:
msecs = 0.79 GPU: msecs = 0.79
running bench [640 480] matrix_concat_floatdouble 8888: msecs = 0.97 565:
msecs = 0.97 GPU: msecs = 0.97
running bench [640 480] matrix_concat_float 8888: msecs = 0.74 565:
msecs = 0.73 GPU: msecs = 0.74</pre>
</div>
<div class="message-actions">
<a href="javascript:M_replyToMessage('2', '2011/06/03 19:11:06', 'TomH')" id="message-reply-href-2">Reply</a>
<textarea rows="7" cols="70" name="message" style="display:none"></textarea>
<div id="message-reply-2" style="display:none;"></div>
</div>
</div>
</div>
<div>
<a href="javascript:M_showAllComments('cl', 3)">
Expand All Messages</a>
|
<a href="javascript:M_hideAllComments('cl', 3)">
Collapse All Messages</a>
</div>
</div>
<script language="JavaScript" type="text/javascript">
<!--
document.onkeydown = M_changelistKeyDown;
var dashboardState = new M_DashboardState(window, 'patch', 'M_CLPatchMarker');
M_switchChangelistCommentByAnchor();
// -->
</script>
<div style="display:none;">
<form method="POST" action="/4571045/publish" id="message-reply-form">
<input type="hidden" name="xsrf_token" value="dd5d1a57ca1d5440593050fdc596d377">
<div></div>
<input type="hidden" name="subject" value="New matrix benchmarks to evaluate ::setConcat implementation options">
<input type="hidden" name="message_only" value="1">
<input type="submit" value="Send Message">
<input type="button" value="Discard" name="discard">
<input type="checkbox" name="send_mail" value="1" id="message-reply-send-mail" checked="checked">
<label>Send mail to reviewers</label>
</form>
</div>
<a id="resizer" class="resizer" style="display:none;cursor:pointer">
<img src="/static/zippyplus.gif">
</a>
</td>
</tr>
</tbody></table>
</div>
<div class="popup" id="popup-issue" style="left: 104px; top: 116px; visibility: hidden; ">
<b>Issue 4571045: New matrix benchmarks to evaluate ::setConcat implementation options
</b><br>
Created 16 minutes ago by me<br>
Modified 0 minutes ago<br>
Reviewers: reed1<br>
Base URL: http://skia.googlecode.com/svn/trunk/<br>
Comments: 0
</div>
<p></p>
<div style="float: left;">
<a target="_blank" href="http://code.google.com/appengine/"><img border="0" src="/static/appengine-noborder-120x30.gif" alt="Powered by Google App Engine"></a>
</div>
<div class="extra" style="font-size: 9pt; float: right; text-align: right;">
<div style="height:14px;">
<img src="/static/rss.gif" alt="RSS Feeds" width="14" height="14" align="top">
<a href="/rss/all">Recent Issues</a>
|
<a href="/rss/mine/TomH">My Issues</a>
|
<a href="/rss/reviews/TomH">My Reviews</a>
|
<a href="/rss/closed/TomH">My Closed</a>
|
<a href="/rss/issue/4571045">This issue</a>
</div>
<div style="margin-top: .3em;">This is Rietveld <a href="http://code.google.com/p/rietveld/updates/list">r756
</a></div>
</div>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script><script src="http://www.google-analytics.com/ga.js" type="text/javascript"></script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-4803694-4");
pageTracker._initData();
pageTracker._trackPageview();
</script>
On platforms that use Float (instead of Fixed), SkMatrix stores its internal
values as floats, but setConcat() needs extra precision and so uses doubles
to contain intermediate values.
These three benchmarks compare the speed of float-only, double-only, and
float-cast-to-double implementations of a chunk of code extracted from the
non-perspective case of setConcat().
git-svn-id: http://skia.googlecode.com/svn/trunk@1497 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-06-03 19:16:56 +00:00
|
|
|
|
2011-06-01 15:11:22 +00:00
|
|
|
m0.reset();
|
|
|
|
m1.reset();
|
|
|
|
m2.reset();
|
|
|
|
always_do(m0 == m1);
|
|
|
|
always_do(m1 == m2);
|
|
|
|
always_do(m2 == m0);
|
|
|
|
}
|
|
|
|
private:
|
|
|
|
typedef MatrixBench INHERITED;
|
|
|
|
};
|
|
|
|
|
|
|
|
class ScaleMatrixBench : public MatrixBench {
|
|
|
|
public:
|
|
|
|
ScaleMatrixBench(void* param) : INHERITED(param, "scale") {
|
2011-06-08 19:38:53 +00:00
|
|
|
fSX = fSY = SkFloatToScalar(1.5f);
|
2011-06-01 15:11:22 +00:00
|
|
|
fM0.reset();
|
|
|
|
fM1.setScale(fSX, fSY);
|
|
|
|
fM2.setTranslate(fSX, fSY);
|
|
|
|
}
|
|
|
|
protected:
|
|
|
|
virtual void performTest() {
|
|
|
|
SkMatrix m;
|
|
|
|
m = fM0; m.preScale(fSX, fSY);
|
|
|
|
m = fM1; m.preScale(fSX, fSY);
|
|
|
|
m = fM2; m.preScale(fSX, fSY);
|
|
|
|
}
|
|
|
|
private:
|
|
|
|
SkMatrix fM0, fM1, fM2;
|
|
|
|
SkScalar fSX, fSY;
|
|
|
|
typedef MatrixBench INHERITED;
|
|
|
|
};
|
|
|
|
|
2011-06-06 13:20:29 +00:00
|
|
|
// having unknown values in our arrays can throw off the timing a lot, perhaps
|
|
|
|
// handling NaN values is a lot slower. Anyway, this guy is just meant to put
|
|
|
|
// reasonable values in our arrays.
|
|
|
|
template <typename T> void init9(T array[9]) {
|
|
|
|
SkRandom rand;
|
|
|
|
for (int i = 0; i < 9; i++) {
|
|
|
|
array[i] = rand.nextSScalar1();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
<body onunload="M_unloadPage();">
<!-- Begin help window -->
<script type="text/javascript"><!--
var xsrfToken = 'dd5d1a57ca1d5440593050fdc596d377';
var helpDisplayed = false;
document.onclick = M_clickCommon;
var media_url = "/static/";
var base_url = "/";
var publish_link = "/4571045/publish";
// -->
</script>
<div id="help" style="display: none;">
<div style="font-size: medium; text-align: center;">Keyboard Shortcuts</div>
<hr>
<table width="100%">
<tbody><tr valign="top">
<td>
<table width="100%">
<tbody><tr>
<td></td><th>File</th>
</tr>
<tr>
<td class="shortcut"><span class="letter">u</span> <b>:</b></td><td>up to issue</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">m</span> <b>:</b></td><td>publish + mail comments</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">M</span> <b>:</b></td><td>edit review message</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">j</span> / <span class="letter">k</span> <b>:</b></td><td>jump to file after / before current file</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">J</span> / <span class="letter">K</span> <b>:</b></td><td>jump to next file with a comment after / before current file</td>
</tr>
<tr>
<td></td><th>Side-by-side diff</th>
</tr>
<tr>
<td class="shortcut"><span class="letter">i</span> <b>:</b></td><td>toggle intra-line diffs</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">e</span> <b>:</b></td><td>expand all comments</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">c</span> <b>:</b></td><td>collapse all comments</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">s</span> <b>:</b></td><td>toggle showing all comments</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">n</span> / <span class="letter">p</span> <b>:</b></td><td>next / previous diff chunk or comment</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">N</span> / <span class="letter">P</span> <b>:</b></td><td>next / previous comment</td>
</tr>
<tr>
<td class="shortcut"><span class="letter"><Enter></span> <b>:</b></td><td>respond to / edit current comment</td>
</tr>
</tbody></table>
</td>
<td>
<table width="100%">
<tbody><tr>
<td></td><th>Issue</th>
</tr>
<tr>
<td class="shortcut"><span class="letter">u</span> <b>:</b></td><td>up to list of issues</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">m</span> <b>:</b></td><td>publish + mail comments</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">j</span> / <span class="letter">k</span> <b>:</b></td><td>jump to patch after / before current patch</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">o</span> / <span class="letter"><Enter></span> <b>:</b></td><td>open current patch in side-by-side view</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">i</span> <b>:</b></td><td>open current patch in unified diff view</td>
</tr>
<tr><td> </td></tr>
<tr><td></td><th>Issue List</th></tr>
<tr>
<td class="shortcut"><span class="letter">j</span> / <span class="letter">k</span> <b>:</b></td><td>jump to issue after / before current issue</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">o</span> / <span class="letter"><Enter></span> <b>:</b></td><td>open current issue</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">#</span> <b>:</b></td>
<td>close issue</td>
</tr>
<tr><td> </td></tr>
<tr>
<td></td><th>Comment/message editing</th>
</tr>
<tr>
<td class="shortcut"><span class="letter"><Ctrl></span> + <span class="letter">s</span> <b>:</b></td><td>save comment</td>
</tr>
<tr>
<td class="shortcut"><span class="letter"><Esc></span> <b>:</b></td><td>cancel edit</td>
</tr>
</tbody></table>
</td>
</tr>
</tbody></table>
</div>
<!-- End help window -->
<div align="right">
<div style="float:left; font-weight:bold"><i>Rietveld</i> Code Review Tool</div>
<b>tomhudson@google.com (TomH)</b>
|
<a class="novisit" href="/settings">Settings</a>
|
<a class="novisit" target="_blank" href="http://code.google.com/p/rietveld/wiki/CodeReviewHelp">Help</a>
|
<a class="novisit" target="_blank" href="http://code.google.com/p/rietveld/issues/list">Bug tracker</a>
|
<a class="novisit" target="_blank" href="http://groups.google.com/group/codereview-discuss">Discussion group</a>
|
<a class="novisit" target="_blank" href="http://code.google.com/p/rietveld">Source code</a>
|
<a class="novisit" href="http://codereview.appspot.com/_ah/logout?continue=https://www.google.com/accounts/Logout%3Fcontinue%3Dhttps://appengine.google.com/_ah/logout%253Fcontinue%253Dhttp://codereview.appspot.com/4571045/%26service%3Dah">Sign out</a>
</div>
<div class="counter">(691)</div>
<div class="mainmenu">
<a href="/" class="active">Issues</a>
<a href="/repos">Repositories</a>
<a href="/search">Search</a>
</div>
<div class="mainmenu2">
<a href="/use_uploadpy">Create Issue</a>
|
<a href="/mine">My Issues</a>
|
<a href="/starred">Starred</a>
|
<a href="/all">Open</a>
|
<a href="/all?closed=1">All</a>
</div>
<div>
<h2>
<span id="issue-star-4571045">
<a href="javascript:M_addIssueStar(4571045)">
<img src="/static/star-dark.gif" width="15" height="15" border="0"></a>
</span>
<span class="issue-close" id="issue-close-4571045">
<a href="javascript:M_closeIssue(4571045)">
<img src="/static/close.gif" title="Close This Issue" width="15" height="15" border="0"></a>
</span>
Issue <a href="/4571045/" onmouseover="M_showPopUp(this, 'popup-issue');">
4571045</a>:
New matrix benchmarks to evaluate ::setConcat implementation options
</h2>
<table class="issue-details" border="0" width="100%">
<tbody><tr valign="top">
<td class="meta" width="20%">
<div>
<a class="novisit" href="/4571045/edit">
Edit Issue
</a>
<br>
<a class="novisit" href="/4571045/publish">
Publish+Mail Comments
</a> ('m')
<br>
<a class="novisit" href="/4571045/diff/1/bench/MatrixBench.cpp">
<b>Start Review</b>
</a>
</div>
<div class="issue_details_sidebar">
<div><b>Created:</b><br>
16 minutes ago by me
</div>
<div><b>Modified:</b><br>
0 minutes ago
</div>
<div><b>Reviewers:</b><br>
<a href="/user/reed1" onmouseover="M_showUserInfoPopup(this)">reed1</a>
</div>
<div><b>CC:</b><br>
</div>
<div><b>Base URL:</b><br>
http://skia.googlecode.com/svn/trunk/
</div>
<div><b>Visibility:</b><br>
Public.
</div>
</div>
</td>
<td style="padding-left: .8em; padding-right: .8em;" width="80%">
<h3><a id="issue-description-pointer" href="javascript:M_toggleSection('issue-description')" class="toggled-section opentriangle">
Description</a></h3>
<div id="issue-description" style="margin-left:15px;">
<pre>On platforms that use Float (instead of Fixed), SkMatrix stores its internal
values as floats, but setConcat() needs extra precision and so uses doubles to
contain intermediate values.
These three benchmarks compare the speed of float-only, double-only, and
float-cast-to-double implementations of a chunk of code extracted from the
non-perspective case of setConcat().
</pre>
</div>
<h3>
<a id="ps-1-pointer" href="javascript:M_toggleSectionForPS('4571045', '1')" class="toggled-section opentriangle">
Patch Set 1
</a>
</h3>
<div id="ps-1" style="">
<div class="issue-list">
<div class="pagination">
<div style="float: left;">
<i>Created:</i> 16 minutes ago
</div>
<div style="float: right;">
<a href="/download/issue4571045_1.diff">
Download raw patch set</a>
</div>
<div style="clear:both;"></div>
</div>
<table id="queues" style="clear:both;">
<tbody><tr align="left">
<th colspan="2"></th>
<th>Unified diffs</th>
<th>Side-by-side diffs</th>
<th>Delta from patch set</th>
<th colspan="3">Stats</th>
<th>Patch</th>
</tr>
<tr name="patch">
<td class="first" width="14"><img src="/static/closedtriangle.gif" style="" width="12" height="9"></td>
<td style="white-space: nowrap">M </td>
<td>
<a class="noul" href="/4571045/patch/1/2">
bench/MatrixBench.cpp
</a>
</td>
<td>
<a class="noul" href="/4571045/diff/1/bench/MatrixBench.cpp">
View
</a>
</td>
<td style="white-space: nowrap">
</td>
<td style="white-space: nowrap">4 chunks</td>
<td style="white-space: nowrap">+114 lines, -3 lines</td>
<td style="white-space: nowrap">
0 comments
</td>
<td>
<a href="/download/issue4571045_1_2.diff" title="Download patch for bench/MatrixBench.cpp">
Download
</a>
</td>
</tr>
</tbody></table>
</div>
</div>
<h3>
<a id="messages-pointer" href="javascript:M_toggleSection('messages')" class="toggled-section opentriangle">
Messages
</a>
</h3>
<div><i>Total messages: 3</i></div>
<div id="messages">
<div style="margin-bottom: .5em;">
<a href="javascript:M_showAllComments('cl', 3)">
Expand All Messages</a>
|
<a href="javascript:M_hideAllComments('cl', 3)">
Collapse All Messages</a>
</div>
<div class="message " id="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UY6QcM" name="0">
<a name="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UY6QcM"></a>
<div class="header">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tbody><tr class="comment_title" onclick="M_switchChangelistComment(0)">
<td style="padding-left: 5px; white-space: nowrap;">
<b>me</b>
</td>
<td width="100%">
<table style="table-layout:fixed; white-space: nowrap;" width="100%">
<tbody><tr>
<td>
<div style="white-space: nowrap; overflow: hidden;" class="extra" id="cl-preview-0">
</div>
</td>
</tr>
</tbody></table>
</td>
<td align="right" style="white-space: nowrap; padding-right: 5px;">
13 minutes ago
</td>
</tr>
</tbody></table>
</div>
<div id="cl-comment-0" style="display: none;">
<div class="message-body">
<pre name="cl-message-0"></pre>
</div>
<div class="message-actions">
<a href="javascript:M_replyToMessage('0', '2011/06/03 18:57:35', 'TomH')" id="message-reply-href-0">Reply</a>
<textarea rows="7" cols="70" name="message" style="display:none"></textarea>
<div id="message-reply-0" style="display:none;"></div>
</div>
</div>
</div>
<div class="message " id="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UY0Q8M" name="1">
<a name="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UY0Q8M"></a>
<div class="header">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tbody><tr class="comment_title" onclick="M_switchChangelistComment(1)">
<td style="padding-left: 5px; white-space: nowrap;">
<b>reed1</b>
</td>
<td width="100%">
<table style="table-layout:fixed; white-space: nowrap;" width="100%">
<tbody><tr>
<td>
<div style="white-space: nowrap; overflow: hidden;" class="extra" id="cl-preview-1">
1. lets remove the "fix" from the function name. just muladdmul I think 2. we ...
</div>
</td>
</tr>
</tbody></table>
</td>
<td align="right" style="white-space: nowrap; padding-right: 5px;">
10 minutes ago
</td>
</tr>
</tbody></table>
</div>
<div id="cl-comment-1" style="display: none;">
<div class="message-body">
<pre name="cl-message-1">1. lets remove the "fix" from the function name. just muladdmul I think
2. we can remove the return, since it will be compiled away anyway
3. nice checkin comment!
4. what are the results like?</pre>
</div>
<div class="message-actions">
<a href="javascript:M_replyToMessage('1', '2011/06/03 19:00:39', 'reed1')" id="message-reply-href-1">Reply</a>
<textarea rows="7" cols="70" name="message" style="display:none"></textarea>
<div id="message-reply-1" style="display:none;"></div>
</div>
</div>
</div>
<div class="message " id="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UYuRcM" name="2">
<a name="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UYuRcM"></a>
<div class="header">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tbody><tr class="comment_title" onclick="M_switchChangelistComment(2)">
<td style="padding-left: 5px; white-space: nowrap;">
<b>me</b>
</td>
<td width="100%">
<table style="table-layout:fixed; white-space: nowrap;" width="100%">
<tbody><tr>
<td>
<div style="white-space: nowrap; overflow: hidden; visibility: hidden;" class="extra" id="cl-preview-2">
> 4. what are the results like? For posterity: tomhudson@tomhudson-zx600-linux:/usr/local/google/src/skia3$ out/bench/bench -match matrix_concat -repeat 1000 ...
</div>
</td>
</tr>
</tbody></table>
</td>
<td align="right" style="white-space: nowrap; padding-right: 5px;">
0 minutes ago
</td>
</tr>
</tbody></table>
</div>
<div id="cl-comment-2">
<div class="message-body">
<pre name="cl-message-2">> 4. what are the results like?
For posterity:
tomhudson@tomhudson-zx600-linux:/usr/local/google/src/skia3$ out/bench/bench
-match matrix_concat -repeat 1000
skia bench: alpha=0xFF antialias=1 filter=0
running bench [640 480] matrix_concat_double 8888: msecs = 0.79 565:
msecs = 0.79 GPU: msecs = 0.79
running bench [640 480] matrix_concat_floatdouble 8888: msecs = 0.97 565:
msecs = 0.97 GPU: msecs = 0.97
running bench [640 480] matrix_concat_float 8888: msecs = 0.74 565:
msecs = 0.73 GPU: msecs = 0.74</pre>
</div>
<div class="message-actions">
<a href="javascript:M_replyToMessage('2', '2011/06/03 19:11:06', 'TomH')" id="message-reply-href-2">Reply</a>
<textarea rows="7" cols="70" name="message" style="display:none"></textarea>
<div id="message-reply-2" style="display:none;"></div>
</div>
</div>
</div>
<div>
<a href="javascript:M_showAllComments('cl', 3)">
Expand All Messages</a>
|
<a href="javascript:M_hideAllComments('cl', 3)">
Collapse All Messages</a>
</div>
</div>
<script language="JavaScript" type="text/javascript">
<!--
document.onkeydown = M_changelistKeyDown;
var dashboardState = new M_DashboardState(window, 'patch', 'M_CLPatchMarker');
M_switchChangelistCommentByAnchor();
// -->
</script>
<div style="display:none;">
<form method="POST" action="/4571045/publish" id="message-reply-form">
<input type="hidden" name="xsrf_token" value="dd5d1a57ca1d5440593050fdc596d377">
<div></div>
<input type="hidden" name="subject" value="New matrix benchmarks to evaluate ::setConcat implementation options">
<input type="hidden" name="message_only" value="1">
<input type="submit" value="Send Message">
<input type="button" value="Discard" name="discard">
<input type="checkbox" name="send_mail" value="1" id="message-reply-send-mail" checked="checked">
<label>Send mail to reviewers</label>
</form>
</div>
<a id="resizer" class="resizer" style="display:none;cursor:pointer">
<img src="/static/zippyplus.gif">
</a>
</td>
</tr>
</tbody></table>
</div>
<div class="popup" id="popup-issue" style="left: 104px; top: 116px; visibility: hidden; ">
<b>Issue 4571045: New matrix benchmarks to evaluate ::setConcat implementation options
</b><br>
Created 16 minutes ago by me<br>
Modified 0 minutes ago<br>
Reviewers: reed1<br>
Base URL: http://skia.googlecode.com/svn/trunk/<br>
Comments: 0
</div>
<p></p>
<div style="float: left;">
<a target="_blank" href="http://code.google.com/appengine/"><img border="0" src="/static/appengine-noborder-120x30.gif" alt="Powered by Google App Engine"></a>
</div>
<div class="extra" style="font-size: 9pt; float: right; text-align: right;">
<div style="height:14px;">
<img src="/static/rss.gif" alt="RSS Feeds" width="14" height="14" align="top">
<a href="/rss/all">Recent Issues</a>
|
<a href="/rss/mine/TomH">My Issues</a>
|
<a href="/rss/reviews/TomH">My Reviews</a>
|
<a href="/rss/closed/TomH">My Closed</a>
|
<a href="/rss/issue/4571045">This issue</a>
</div>
<div style="margin-top: .3em;">This is Rietveld <a href="http://code.google.com/p/rietveld/updates/list">r756
</a></div>
</div>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script><script src="http://www.google-analytics.com/ga.js" type="text/javascript"></script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-4803694-4");
pageTracker._initData();
pageTracker._trackPageview();
</script>
On platforms that use Float (instead of Fixed), SkMatrix stores its internal
values as floats, but setConcat() needs extra precision and so uses doubles
to contain intermediate values.
These three benchmarks compare the speed of float-only, double-only, and
float-cast-to-double implementations of a chunk of code extracted from the
non-perspective case of setConcat().
git-svn-id: http://skia.googlecode.com/svn/trunk@1497 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-06-03 19:16:56 +00:00
|
|
|
// Test the performance of setConcat() non-perspective case:
|
|
|
|
// using floating point precision only.
|
|
|
|
class FloatConcatMatrixBench : public MatrixBench {
|
|
|
|
public:
|
2011-06-06 13:20:29 +00:00
|
|
|
FloatConcatMatrixBench(void* p) : INHERITED(p, "concat_floatfloat") {
|
|
|
|
init9(mya);
|
|
|
|
init9(myb);
|
|
|
|
init9(myr);
|
<body onunload="M_unloadPage();">
<!-- Begin help window -->
<script type="text/javascript"><!--
var xsrfToken = 'dd5d1a57ca1d5440593050fdc596d377';
var helpDisplayed = false;
document.onclick = M_clickCommon;
var media_url = "/static/";
var base_url = "/";
var publish_link = "/4571045/publish";
// -->
</script>
<div id="help" style="display: none;">
<div style="font-size: medium; text-align: center;">Keyboard Shortcuts</div>
<hr>
<table width="100%">
<tbody><tr valign="top">
<td>
<table width="100%">
<tbody><tr>
<td></td><th>File</th>
</tr>
<tr>
<td class="shortcut"><span class="letter">u</span> <b>:</b></td><td>up to issue</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">m</span> <b>:</b></td><td>publish + mail comments</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">M</span> <b>:</b></td><td>edit review message</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">j</span> / <span class="letter">k</span> <b>:</b></td><td>jump to file after / before current file</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">J</span> / <span class="letter">K</span> <b>:</b></td><td>jump to next file with a comment after / before current file</td>
</tr>
<tr>
<td></td><th>Side-by-side diff</th>
</tr>
<tr>
<td class="shortcut"><span class="letter">i</span> <b>:</b></td><td>toggle intra-line diffs</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">e</span> <b>:</b></td><td>expand all comments</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">c</span> <b>:</b></td><td>collapse all comments</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">s</span> <b>:</b></td><td>toggle showing all comments</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">n</span> / <span class="letter">p</span> <b>:</b></td><td>next / previous diff chunk or comment</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">N</span> / <span class="letter">P</span> <b>:</b></td><td>next / previous comment</td>
</tr>
<tr>
<td class="shortcut"><span class="letter"><Enter></span> <b>:</b></td><td>respond to / edit current comment</td>
</tr>
</tbody></table>
</td>
<td>
<table width="100%">
<tbody><tr>
<td></td><th>Issue</th>
</tr>
<tr>
<td class="shortcut"><span class="letter">u</span> <b>:</b></td><td>up to list of issues</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">m</span> <b>:</b></td><td>publish + mail comments</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">j</span> / <span class="letter">k</span> <b>:</b></td><td>jump to patch after / before current patch</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">o</span> / <span class="letter"><Enter></span> <b>:</b></td><td>open current patch in side-by-side view</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">i</span> <b>:</b></td><td>open current patch in unified diff view</td>
</tr>
<tr><td> </td></tr>
<tr><td></td><th>Issue List</th></tr>
<tr>
<td class="shortcut"><span class="letter">j</span> / <span class="letter">k</span> <b>:</b></td><td>jump to issue after / before current issue</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">o</span> / <span class="letter"><Enter></span> <b>:</b></td><td>open current issue</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">#</span> <b>:</b></td>
<td>close issue</td>
</tr>
<tr><td> </td></tr>
<tr>
<td></td><th>Comment/message editing</th>
</tr>
<tr>
<td class="shortcut"><span class="letter"><Ctrl></span> + <span class="letter">s</span> <b>:</b></td><td>save comment</td>
</tr>
<tr>
<td class="shortcut"><span class="letter"><Esc></span> <b>:</b></td><td>cancel edit</td>
</tr>
</tbody></table>
</td>
</tr>
</tbody></table>
</div>
<!-- End help window -->
<div align="right">
<div style="float:left; font-weight:bold"><i>Rietveld</i> Code Review Tool</div>
<b>tomhudson@google.com (TomH)</b>
|
<a class="novisit" href="/settings">Settings</a>
|
<a class="novisit" target="_blank" href="http://code.google.com/p/rietveld/wiki/CodeReviewHelp">Help</a>
|
<a class="novisit" target="_blank" href="http://code.google.com/p/rietveld/issues/list">Bug tracker</a>
|
<a class="novisit" target="_blank" href="http://groups.google.com/group/codereview-discuss">Discussion group</a>
|
<a class="novisit" target="_blank" href="http://code.google.com/p/rietveld">Source code</a>
|
<a class="novisit" href="http://codereview.appspot.com/_ah/logout?continue=https://www.google.com/accounts/Logout%3Fcontinue%3Dhttps://appengine.google.com/_ah/logout%253Fcontinue%253Dhttp://codereview.appspot.com/4571045/%26service%3Dah">Sign out</a>
</div>
<div class="counter">(691)</div>
<div class="mainmenu">
<a href="/" class="active">Issues</a>
<a href="/repos">Repositories</a>
<a href="/search">Search</a>
</div>
<div class="mainmenu2">
<a href="/use_uploadpy">Create Issue</a>
|
<a href="/mine">My Issues</a>
|
<a href="/starred">Starred</a>
|
<a href="/all">Open</a>
|
<a href="/all?closed=1">All</a>
</div>
<div>
<h2>
<span id="issue-star-4571045">
<a href="javascript:M_addIssueStar(4571045)">
<img src="/static/star-dark.gif" width="15" height="15" border="0"></a>
</span>
<span class="issue-close" id="issue-close-4571045">
<a href="javascript:M_closeIssue(4571045)">
<img src="/static/close.gif" title="Close This Issue" width="15" height="15" border="0"></a>
</span>
Issue <a href="/4571045/" onmouseover="M_showPopUp(this, 'popup-issue');">
4571045</a>:
New matrix benchmarks to evaluate ::setConcat implementation options
</h2>
<table class="issue-details" border="0" width="100%">
<tbody><tr valign="top">
<td class="meta" width="20%">
<div>
<a class="novisit" href="/4571045/edit">
Edit Issue
</a>
<br>
<a class="novisit" href="/4571045/publish">
Publish+Mail Comments
</a> ('m')
<br>
<a class="novisit" href="/4571045/diff/1/bench/MatrixBench.cpp">
<b>Start Review</b>
</a>
</div>
<div class="issue_details_sidebar">
<div><b>Created:</b><br>
16 minutes ago by me
</div>
<div><b>Modified:</b><br>
0 minutes ago
</div>
<div><b>Reviewers:</b><br>
<a href="/user/reed1" onmouseover="M_showUserInfoPopup(this)">reed1</a>
</div>
<div><b>CC:</b><br>
</div>
<div><b>Base URL:</b><br>
http://skia.googlecode.com/svn/trunk/
</div>
<div><b>Visibility:</b><br>
Public.
</div>
</div>
</td>
<td style="padding-left: .8em; padding-right: .8em;" width="80%">
<h3><a id="issue-description-pointer" href="javascript:M_toggleSection('issue-description')" class="toggled-section opentriangle">
Description</a></h3>
<div id="issue-description" style="margin-left:15px;">
<pre>On platforms that use Float (instead of Fixed), SkMatrix stores its internal
values as floats, but setConcat() needs extra precision and so uses doubles to
contain intermediate values.
These three benchmarks compare the speed of float-only, double-only, and
float-cast-to-double implementations of a chunk of code extracted from the
non-perspective case of setConcat().
</pre>
</div>
<h3>
<a id="ps-1-pointer" href="javascript:M_toggleSectionForPS('4571045', '1')" class="toggled-section opentriangle">
Patch Set 1
</a>
</h3>
<div id="ps-1" style="">
<div class="issue-list">
<div class="pagination">
<div style="float: left;">
<i>Created:</i> 16 minutes ago
</div>
<div style="float: right;">
<a href="/download/issue4571045_1.diff">
Download raw patch set</a>
</div>
<div style="clear:both;"></div>
</div>
<table id="queues" style="clear:both;">
<tbody><tr align="left">
<th colspan="2"></th>
<th>Unified diffs</th>
<th>Side-by-side diffs</th>
<th>Delta from patch set</th>
<th colspan="3">Stats</th>
<th>Patch</th>
</tr>
<tr name="patch">
<td class="first" width="14"><img src="/static/closedtriangle.gif" style="" width="12" height="9"></td>
<td style="white-space: nowrap">M </td>
<td>
<a class="noul" href="/4571045/patch/1/2">
bench/MatrixBench.cpp
</a>
</td>
<td>
<a class="noul" href="/4571045/diff/1/bench/MatrixBench.cpp">
View
</a>
</td>
<td style="white-space: nowrap">
</td>
<td style="white-space: nowrap">4 chunks</td>
<td style="white-space: nowrap">+114 lines, -3 lines</td>
<td style="white-space: nowrap">
0 comments
</td>
<td>
<a href="/download/issue4571045_1_2.diff" title="Download patch for bench/MatrixBench.cpp">
Download
</a>
</td>
</tr>
</tbody></table>
</div>
</div>
<h3>
<a id="messages-pointer" href="javascript:M_toggleSection('messages')" class="toggled-section opentriangle">
Messages
</a>
</h3>
<div><i>Total messages: 3</i></div>
<div id="messages">
<div style="margin-bottom: .5em;">
<a href="javascript:M_showAllComments('cl', 3)">
Expand All Messages</a>
|
<a href="javascript:M_hideAllComments('cl', 3)">
Collapse All Messages</a>
</div>
<div class="message " id="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UY6QcM" name="0">
<a name="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UY6QcM"></a>
<div class="header">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tbody><tr class="comment_title" onclick="M_switchChangelistComment(0)">
<td style="padding-left: 5px; white-space: nowrap;">
<b>me</b>
</td>
<td width="100%">
<table style="table-layout:fixed; white-space: nowrap;" width="100%">
<tbody><tr>
<td>
<div style="white-space: nowrap; overflow: hidden;" class="extra" id="cl-preview-0">
</div>
</td>
</tr>
</tbody></table>
</td>
<td align="right" style="white-space: nowrap; padding-right: 5px;">
13 minutes ago
</td>
</tr>
</tbody></table>
</div>
<div id="cl-comment-0" style="display: none;">
<div class="message-body">
<pre name="cl-message-0"></pre>
</div>
<div class="message-actions">
<a href="javascript:M_replyToMessage('0', '2011/06/03 18:57:35', 'TomH')" id="message-reply-href-0">Reply</a>
<textarea rows="7" cols="70" name="message" style="display:none"></textarea>
<div id="message-reply-0" style="display:none;"></div>
</div>
</div>
</div>
<div class="message " id="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UY0Q8M" name="1">
<a name="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UY0Q8M"></a>
<div class="header">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tbody><tr class="comment_title" onclick="M_switchChangelistComment(1)">
<td style="padding-left: 5px; white-space: nowrap;">
<b>reed1</b>
</td>
<td width="100%">
<table style="table-layout:fixed; white-space: nowrap;" width="100%">
<tbody><tr>
<td>
<div style="white-space: nowrap; overflow: hidden;" class="extra" id="cl-preview-1">
1. lets remove the "fix" from the function name. just muladdmul I think 2. we ...
</div>
</td>
</tr>
</tbody></table>
</td>
<td align="right" style="white-space: nowrap; padding-right: 5px;">
10 minutes ago
</td>
</tr>
</tbody></table>
</div>
<div id="cl-comment-1" style="display: none;">
<div class="message-body">
<pre name="cl-message-1">1. lets remove the "fix" from the function name. just muladdmul I think
2. we can remove the return, since it will be compiled away anyway
3. nice checkin comment!
4. what are the results like?</pre>
</div>
<div class="message-actions">
<a href="javascript:M_replyToMessage('1', '2011/06/03 19:00:39', 'reed1')" id="message-reply-href-1">Reply</a>
<textarea rows="7" cols="70" name="message" style="display:none"></textarea>
<div id="message-reply-1" style="display:none;"></div>
</div>
</div>
</div>
<div class="message " id="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UYuRcM" name="2">
<a name="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UYuRcM"></a>
<div class="header">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tbody><tr class="comment_title" onclick="M_switchChangelistComment(2)">
<td style="padding-left: 5px; white-space: nowrap;">
<b>me</b>
</td>
<td width="100%">
<table style="table-layout:fixed; white-space: nowrap;" width="100%">
<tbody><tr>
<td>
<div style="white-space: nowrap; overflow: hidden; visibility: hidden;" class="extra" id="cl-preview-2">
> 4. what are the results like? For posterity: tomhudson@tomhudson-zx600-linux:/usr/local/google/src/skia3$ out/bench/bench -match matrix_concat -repeat 1000 ...
</div>
</td>
</tr>
</tbody></table>
</td>
<td align="right" style="white-space: nowrap; padding-right: 5px;">
0 minutes ago
</td>
</tr>
</tbody></table>
</div>
<div id="cl-comment-2">
<div class="message-body">
<pre name="cl-message-2">> 4. what are the results like?
For posterity:
tomhudson@tomhudson-zx600-linux:/usr/local/google/src/skia3$ out/bench/bench
-match matrix_concat -repeat 1000
skia bench: alpha=0xFF antialias=1 filter=0
running bench [640 480] matrix_concat_double 8888: msecs = 0.79 565:
msecs = 0.79 GPU: msecs = 0.79
running bench [640 480] matrix_concat_floatdouble 8888: msecs = 0.97 565:
msecs = 0.97 GPU: msecs = 0.97
running bench [640 480] matrix_concat_float 8888: msecs = 0.74 565:
msecs = 0.73 GPU: msecs = 0.74</pre>
</div>
<div class="message-actions">
<a href="javascript:M_replyToMessage('2', '2011/06/03 19:11:06', 'TomH')" id="message-reply-href-2">Reply</a>
<textarea rows="7" cols="70" name="message" style="display:none"></textarea>
<div id="message-reply-2" style="display:none;"></div>
</div>
</div>
</div>
<div>
<a href="javascript:M_showAllComments('cl', 3)">
Expand All Messages</a>
|
<a href="javascript:M_hideAllComments('cl', 3)">
Collapse All Messages</a>
</div>
</div>
<script language="JavaScript" type="text/javascript">
<!--
document.onkeydown = M_changelistKeyDown;
var dashboardState = new M_DashboardState(window, 'patch', 'M_CLPatchMarker');
M_switchChangelistCommentByAnchor();
// -->
</script>
<div style="display:none;">
<form method="POST" action="/4571045/publish" id="message-reply-form">
<input type="hidden" name="xsrf_token" value="dd5d1a57ca1d5440593050fdc596d377">
<div></div>
<input type="hidden" name="subject" value="New matrix benchmarks to evaluate ::setConcat implementation options">
<input type="hidden" name="message_only" value="1">
<input type="submit" value="Send Message">
<input type="button" value="Discard" name="discard">
<input type="checkbox" name="send_mail" value="1" id="message-reply-send-mail" checked="checked">
<label>Send mail to reviewers</label>
</form>
</div>
<a id="resizer" class="resizer" style="display:none;cursor:pointer">
<img src="/static/zippyplus.gif">
</a>
</td>
</tr>
</tbody></table>
</div>
<div class="popup" id="popup-issue" style="left: 104px; top: 116px; visibility: hidden; ">
<b>Issue 4571045: New matrix benchmarks to evaluate ::setConcat implementation options
</b><br>
Created 16 minutes ago by me<br>
Modified 0 minutes ago<br>
Reviewers: reed1<br>
Base URL: http://skia.googlecode.com/svn/trunk/<br>
Comments: 0
</div>
<p></p>
<div style="float: left;">
<a target="_blank" href="http://code.google.com/appengine/"><img border="0" src="/static/appengine-noborder-120x30.gif" alt="Powered by Google App Engine"></a>
</div>
<div class="extra" style="font-size: 9pt; float: right; text-align: right;">
<div style="height:14px;">
<img src="/static/rss.gif" alt="RSS Feeds" width="14" height="14" align="top">
<a href="/rss/all">Recent Issues</a>
|
<a href="/rss/mine/TomH">My Issues</a>
|
<a href="/rss/reviews/TomH">My Reviews</a>
|
<a href="/rss/closed/TomH">My Closed</a>
|
<a href="/rss/issue/4571045">This issue</a>
</div>
<div style="margin-top: .3em;">This is Rietveld <a href="http://code.google.com/p/rietveld/updates/list">r756
</a></div>
</div>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script><script src="http://www.google-analytics.com/ga.js" type="text/javascript"></script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-4803694-4");
pageTracker._initData();
pageTracker._trackPageview();
</script>
On platforms that use Float (instead of Fixed), SkMatrix stores its internal
values as floats, but setConcat() needs extra precision and so uses doubles
to contain intermediate values.
These three benchmarks compare the speed of float-only, double-only, and
float-cast-to-double implementations of a chunk of code extracted from the
non-perspective case of setConcat().
git-svn-id: http://skia.googlecode.com/svn/trunk@1497 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-06-03 19:16:56 +00:00
|
|
|
}
|
|
|
|
protected:
|
2011-06-06 13:31:30 +00:00
|
|
|
virtual int mulLoopCount() const { return 4; }
|
|
|
|
|
<body onunload="M_unloadPage();">
<!-- Begin help window -->
<script type="text/javascript"><!--
var xsrfToken = 'dd5d1a57ca1d5440593050fdc596d377';
var helpDisplayed = false;
document.onclick = M_clickCommon;
var media_url = "/static/";
var base_url = "/";
var publish_link = "/4571045/publish";
// -->
</script>
<div id="help" style="display: none;">
<div style="font-size: medium; text-align: center;">Keyboard Shortcuts</div>
<hr>
<table width="100%">
<tbody><tr valign="top">
<td>
<table width="100%">
<tbody><tr>
<td></td><th>File</th>
</tr>
<tr>
<td class="shortcut"><span class="letter">u</span> <b>:</b></td><td>up to issue</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">m</span> <b>:</b></td><td>publish + mail comments</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">M</span> <b>:</b></td><td>edit review message</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">j</span> / <span class="letter">k</span> <b>:</b></td><td>jump to file after / before current file</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">J</span> / <span class="letter">K</span> <b>:</b></td><td>jump to next file with a comment after / before current file</td>
</tr>
<tr>
<td></td><th>Side-by-side diff</th>
</tr>
<tr>
<td class="shortcut"><span class="letter">i</span> <b>:</b></td><td>toggle intra-line diffs</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">e</span> <b>:</b></td><td>expand all comments</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">c</span> <b>:</b></td><td>collapse all comments</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">s</span> <b>:</b></td><td>toggle showing all comments</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">n</span> / <span class="letter">p</span> <b>:</b></td><td>next / previous diff chunk or comment</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">N</span> / <span class="letter">P</span> <b>:</b></td><td>next / previous comment</td>
</tr>
<tr>
<td class="shortcut"><span class="letter"><Enter></span> <b>:</b></td><td>respond to / edit current comment</td>
</tr>
</tbody></table>
</td>
<td>
<table width="100%">
<tbody><tr>
<td></td><th>Issue</th>
</tr>
<tr>
<td class="shortcut"><span class="letter">u</span> <b>:</b></td><td>up to list of issues</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">m</span> <b>:</b></td><td>publish + mail comments</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">j</span> / <span class="letter">k</span> <b>:</b></td><td>jump to patch after / before current patch</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">o</span> / <span class="letter"><Enter></span> <b>:</b></td><td>open current patch in side-by-side view</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">i</span> <b>:</b></td><td>open current patch in unified diff view</td>
</tr>
<tr><td> </td></tr>
<tr><td></td><th>Issue List</th></tr>
<tr>
<td class="shortcut"><span class="letter">j</span> / <span class="letter">k</span> <b>:</b></td><td>jump to issue after / before current issue</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">o</span> / <span class="letter"><Enter></span> <b>:</b></td><td>open current issue</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">#</span> <b>:</b></td>
<td>close issue</td>
</tr>
<tr><td> </td></tr>
<tr>
<td></td><th>Comment/message editing</th>
</tr>
<tr>
<td class="shortcut"><span class="letter"><Ctrl></span> + <span class="letter">s</span> <b>:</b></td><td>save comment</td>
</tr>
<tr>
<td class="shortcut"><span class="letter"><Esc></span> <b>:</b></td><td>cancel edit</td>
</tr>
</tbody></table>
</td>
</tr>
</tbody></table>
</div>
<!-- End help window -->
<div align="right">
<div style="float:left; font-weight:bold"><i>Rietveld</i> Code Review Tool</div>
<b>tomhudson@google.com (TomH)</b>
|
<a class="novisit" href="/settings">Settings</a>
|
<a class="novisit" target="_blank" href="http://code.google.com/p/rietveld/wiki/CodeReviewHelp">Help</a>
|
<a class="novisit" target="_blank" href="http://code.google.com/p/rietveld/issues/list">Bug tracker</a>
|
<a class="novisit" target="_blank" href="http://groups.google.com/group/codereview-discuss">Discussion group</a>
|
<a class="novisit" target="_blank" href="http://code.google.com/p/rietveld">Source code</a>
|
<a class="novisit" href="http://codereview.appspot.com/_ah/logout?continue=https://www.google.com/accounts/Logout%3Fcontinue%3Dhttps://appengine.google.com/_ah/logout%253Fcontinue%253Dhttp://codereview.appspot.com/4571045/%26service%3Dah">Sign out</a>
</div>
<div class="counter">(691)</div>
<div class="mainmenu">
<a href="/" class="active">Issues</a>
<a href="/repos">Repositories</a>
<a href="/search">Search</a>
</div>
<div class="mainmenu2">
<a href="/use_uploadpy">Create Issue</a>
|
<a href="/mine">My Issues</a>
|
<a href="/starred">Starred</a>
|
<a href="/all">Open</a>
|
<a href="/all?closed=1">All</a>
</div>
<div>
<h2>
<span id="issue-star-4571045">
<a href="javascript:M_addIssueStar(4571045)">
<img src="/static/star-dark.gif" width="15" height="15" border="0"></a>
</span>
<span class="issue-close" id="issue-close-4571045">
<a href="javascript:M_closeIssue(4571045)">
<img src="/static/close.gif" title="Close This Issue" width="15" height="15" border="0"></a>
</span>
Issue <a href="/4571045/" onmouseover="M_showPopUp(this, 'popup-issue');">
4571045</a>:
New matrix benchmarks to evaluate ::setConcat implementation options
</h2>
<table class="issue-details" border="0" width="100%">
<tbody><tr valign="top">
<td class="meta" width="20%">
<div>
<a class="novisit" href="/4571045/edit">
Edit Issue
</a>
<br>
<a class="novisit" href="/4571045/publish">
Publish+Mail Comments
</a> ('m')
<br>
<a class="novisit" href="/4571045/diff/1/bench/MatrixBench.cpp">
<b>Start Review</b>
</a>
</div>
<div class="issue_details_sidebar">
<div><b>Created:</b><br>
16 minutes ago by me
</div>
<div><b>Modified:</b><br>
0 minutes ago
</div>
<div><b>Reviewers:</b><br>
<a href="/user/reed1" onmouseover="M_showUserInfoPopup(this)">reed1</a>
</div>
<div><b>CC:</b><br>
</div>
<div><b>Base URL:</b><br>
http://skia.googlecode.com/svn/trunk/
</div>
<div><b>Visibility:</b><br>
Public.
</div>
</div>
</td>
<td style="padding-left: .8em; padding-right: .8em;" width="80%">
<h3><a id="issue-description-pointer" href="javascript:M_toggleSection('issue-description')" class="toggled-section opentriangle">
Description</a></h3>
<div id="issue-description" style="margin-left:15px;">
<pre>On platforms that use Float (instead of Fixed), SkMatrix stores its internal
values as floats, but setConcat() needs extra precision and so uses doubles to
contain intermediate values.
These three benchmarks compare the speed of float-only, double-only, and
float-cast-to-double implementations of a chunk of code extracted from the
non-perspective case of setConcat().
</pre>
</div>
<h3>
<a id="ps-1-pointer" href="javascript:M_toggleSectionForPS('4571045', '1')" class="toggled-section opentriangle">
Patch Set 1
</a>
</h3>
<div id="ps-1" style="">
<div class="issue-list">
<div class="pagination">
<div style="float: left;">
<i>Created:</i> 16 minutes ago
</div>
<div style="float: right;">
<a href="/download/issue4571045_1.diff">
Download raw patch set</a>
</div>
<div style="clear:both;"></div>
</div>
<table id="queues" style="clear:both;">
<tbody><tr align="left">
<th colspan="2"></th>
<th>Unified diffs</th>
<th>Side-by-side diffs</th>
<th>Delta from patch set</th>
<th colspan="3">Stats</th>
<th>Patch</th>
</tr>
<tr name="patch">
<td class="first" width="14"><img src="/static/closedtriangle.gif" style="" width="12" height="9"></td>
<td style="white-space: nowrap">M </td>
<td>
<a class="noul" href="/4571045/patch/1/2">
bench/MatrixBench.cpp
</a>
</td>
<td>
<a class="noul" href="/4571045/diff/1/bench/MatrixBench.cpp">
View
</a>
</td>
<td style="white-space: nowrap">
</td>
<td style="white-space: nowrap">4 chunks</td>
<td style="white-space: nowrap">+114 lines, -3 lines</td>
<td style="white-space: nowrap">
0 comments
</td>
<td>
<a href="/download/issue4571045_1_2.diff" title="Download patch for bench/MatrixBench.cpp">
Download
</a>
</td>
</tr>
</tbody></table>
</div>
</div>
<h3>
<a id="messages-pointer" href="javascript:M_toggleSection('messages')" class="toggled-section opentriangle">
Messages
</a>
</h3>
<div><i>Total messages: 3</i></div>
<div id="messages">
<div style="margin-bottom: .5em;">
<a href="javascript:M_showAllComments('cl', 3)">
Expand All Messages</a>
|
<a href="javascript:M_hideAllComments('cl', 3)">
Collapse All Messages</a>
</div>
<div class="message " id="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UY6QcM" name="0">
<a name="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UY6QcM"></a>
<div class="header">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tbody><tr class="comment_title" onclick="M_switchChangelistComment(0)">
<td style="padding-left: 5px; white-space: nowrap;">
<b>me</b>
</td>
<td width="100%">
<table style="table-layout:fixed; white-space: nowrap;" width="100%">
<tbody><tr>
<td>
<div style="white-space: nowrap; overflow: hidden;" class="extra" id="cl-preview-0">
</div>
</td>
</tr>
</tbody></table>
</td>
<td align="right" style="white-space: nowrap; padding-right: 5px;">
13 minutes ago
</td>
</tr>
</tbody></table>
</div>
<div id="cl-comment-0" style="display: none;">
<div class="message-body">
<pre name="cl-message-0"></pre>
</div>
<div class="message-actions">
<a href="javascript:M_replyToMessage('0', '2011/06/03 18:57:35', 'TomH')" id="message-reply-href-0">Reply</a>
<textarea rows="7" cols="70" name="message" style="display:none"></textarea>
<div id="message-reply-0" style="display:none;"></div>
</div>
</div>
</div>
<div class="message " id="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UY0Q8M" name="1">
<a name="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UY0Q8M"></a>
<div class="header">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tbody><tr class="comment_title" onclick="M_switchChangelistComment(1)">
<td style="padding-left: 5px; white-space: nowrap;">
<b>reed1</b>
</td>
<td width="100%">
<table style="table-layout:fixed; white-space: nowrap;" width="100%">
<tbody><tr>
<td>
<div style="white-space: nowrap; overflow: hidden;" class="extra" id="cl-preview-1">
1. lets remove the "fix" from the function name. just muladdmul I think 2. we ...
</div>
</td>
</tr>
</tbody></table>
</td>
<td align="right" style="white-space: nowrap; padding-right: 5px;">
10 minutes ago
</td>
</tr>
</tbody></table>
</div>
<div id="cl-comment-1" style="display: none;">
<div class="message-body">
<pre name="cl-message-1">1. lets remove the "fix" from the function name. just muladdmul I think
2. we can remove the return, since it will be compiled away anyway
3. nice checkin comment!
4. what are the results like?</pre>
</div>
<div class="message-actions">
<a href="javascript:M_replyToMessage('1', '2011/06/03 19:00:39', 'reed1')" id="message-reply-href-1">Reply</a>
<textarea rows="7" cols="70" name="message" style="display:none"></textarea>
<div id="message-reply-1" style="display:none;"></div>
</div>
</div>
</div>
<div class="message " id="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UYuRcM" name="2">
<a name="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UYuRcM"></a>
<div class="header">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tbody><tr class="comment_title" onclick="M_switchChangelistComment(2)">
<td style="padding-left: 5px; white-space: nowrap;">
<b>me</b>
</td>
<td width="100%">
<table style="table-layout:fixed; white-space: nowrap;" width="100%">
<tbody><tr>
<td>
<div style="white-space: nowrap; overflow: hidden; visibility: hidden;" class="extra" id="cl-preview-2">
> 4. what are the results like? For posterity: tomhudson@tomhudson-zx600-linux:/usr/local/google/src/skia3$ out/bench/bench -match matrix_concat -repeat 1000 ...
</div>
</td>
</tr>
</tbody></table>
</td>
<td align="right" style="white-space: nowrap; padding-right: 5px;">
0 minutes ago
</td>
</tr>
</tbody></table>
</div>
<div id="cl-comment-2">
<div class="message-body">
<pre name="cl-message-2">> 4. what are the results like?
For posterity:
tomhudson@tomhudson-zx600-linux:/usr/local/google/src/skia3$ out/bench/bench
-match matrix_concat -repeat 1000
skia bench: alpha=0xFF antialias=1 filter=0
running bench [640 480] matrix_concat_double 8888: msecs = 0.79 565:
msecs = 0.79 GPU: msecs = 0.79
running bench [640 480] matrix_concat_floatdouble 8888: msecs = 0.97 565:
msecs = 0.97 GPU: msecs = 0.97
running bench [640 480] matrix_concat_float 8888: msecs = 0.74 565:
msecs = 0.73 GPU: msecs = 0.74</pre>
</div>
<div class="message-actions">
<a href="javascript:M_replyToMessage('2', '2011/06/03 19:11:06', 'TomH')" id="message-reply-href-2">Reply</a>
<textarea rows="7" cols="70" name="message" style="display:none"></textarea>
<div id="message-reply-2" style="display:none;"></div>
</div>
</div>
</div>
<div>
<a href="javascript:M_showAllComments('cl', 3)">
Expand All Messages</a>
|
<a href="javascript:M_hideAllComments('cl', 3)">
Collapse All Messages</a>
</div>
</div>
<script language="JavaScript" type="text/javascript">
<!--
document.onkeydown = M_changelistKeyDown;
var dashboardState = new M_DashboardState(window, 'patch', 'M_CLPatchMarker');
M_switchChangelistCommentByAnchor();
// -->
</script>
<div style="display:none;">
<form method="POST" action="/4571045/publish" id="message-reply-form">
<input type="hidden" name="xsrf_token" value="dd5d1a57ca1d5440593050fdc596d377">
<div></div>
<input type="hidden" name="subject" value="New matrix benchmarks to evaluate ::setConcat implementation options">
<input type="hidden" name="message_only" value="1">
<input type="submit" value="Send Message">
<input type="button" value="Discard" name="discard">
<input type="checkbox" name="send_mail" value="1" id="message-reply-send-mail" checked="checked">
<label>Send mail to reviewers</label>
</form>
</div>
<a id="resizer" class="resizer" style="display:none;cursor:pointer">
<img src="/static/zippyplus.gif">
</a>
</td>
</tr>
</tbody></table>
</div>
<div class="popup" id="popup-issue" style="left: 104px; top: 116px; visibility: hidden; ">
<b>Issue 4571045: New matrix benchmarks to evaluate ::setConcat implementation options
</b><br>
Created 16 minutes ago by me<br>
Modified 0 minutes ago<br>
Reviewers: reed1<br>
Base URL: http://skia.googlecode.com/svn/trunk/<br>
Comments: 0
</div>
<p></p>
<div style="float: left;">
<a target="_blank" href="http://code.google.com/appengine/"><img border="0" src="/static/appengine-noborder-120x30.gif" alt="Powered by Google App Engine"></a>
</div>
<div class="extra" style="font-size: 9pt; float: right; text-align: right;">
<div style="height:14px;">
<img src="/static/rss.gif" alt="RSS Feeds" width="14" height="14" align="top">
<a href="/rss/all">Recent Issues</a>
|
<a href="/rss/mine/TomH">My Issues</a>
|
<a href="/rss/reviews/TomH">My Reviews</a>
|
<a href="/rss/closed/TomH">My Closed</a>
|
<a href="/rss/issue/4571045">This issue</a>
</div>
<div style="margin-top: .3em;">This is Rietveld <a href="http://code.google.com/p/rietveld/updates/list">r756
</a></div>
</div>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script><script src="http://www.google-analytics.com/ga.js" type="text/javascript"></script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-4803694-4");
pageTracker._initData();
pageTracker._trackPageview();
</script>
On platforms that use Float (instead of Fixed), SkMatrix stores its internal
values as floats, but setConcat() needs extra precision and so uses doubles
to contain intermediate values.
These three benchmarks compare the speed of float-only, double-only, and
float-cast-to-double implementations of a chunk of code extracted from the
non-perspective case of setConcat().
git-svn-id: http://skia.googlecode.com/svn/trunk@1497 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-06-03 19:16:56 +00:00
|
|
|
static inline void muladdmul(float a, float b, float c, float d,
|
|
|
|
float* result) {
|
|
|
|
*result = a * b + c * d;
|
|
|
|
}
|
|
|
|
virtual void performTest() {
|
2011-06-03 20:32:58 +00:00
|
|
|
const float* a = mya;
|
|
|
|
const float* b = myb;
|
|
|
|
float* r = myr;
|
<body onunload="M_unloadPage();">
<!-- Begin help window -->
<script type="text/javascript"><!--
var xsrfToken = 'dd5d1a57ca1d5440593050fdc596d377';
var helpDisplayed = false;
document.onclick = M_clickCommon;
var media_url = "/static/";
var base_url = "/";
var publish_link = "/4571045/publish";
// -->
</script>
<div id="help" style="display: none;">
<div style="font-size: medium; text-align: center;">Keyboard Shortcuts</div>
<hr>
<table width="100%">
<tbody><tr valign="top">
<td>
<table width="100%">
<tbody><tr>
<td></td><th>File</th>
</tr>
<tr>
<td class="shortcut"><span class="letter">u</span> <b>:</b></td><td>up to issue</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">m</span> <b>:</b></td><td>publish + mail comments</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">M</span> <b>:</b></td><td>edit review message</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">j</span> / <span class="letter">k</span> <b>:</b></td><td>jump to file after / before current file</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">J</span> / <span class="letter">K</span> <b>:</b></td><td>jump to next file with a comment after / before current file</td>
</tr>
<tr>
<td></td><th>Side-by-side diff</th>
</tr>
<tr>
<td class="shortcut"><span class="letter">i</span> <b>:</b></td><td>toggle intra-line diffs</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">e</span> <b>:</b></td><td>expand all comments</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">c</span> <b>:</b></td><td>collapse all comments</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">s</span> <b>:</b></td><td>toggle showing all comments</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">n</span> / <span class="letter">p</span> <b>:</b></td><td>next / previous diff chunk or comment</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">N</span> / <span class="letter">P</span> <b>:</b></td><td>next / previous comment</td>
</tr>
<tr>
<td class="shortcut"><span class="letter"><Enter></span> <b>:</b></td><td>respond to / edit current comment</td>
</tr>
</tbody></table>
</td>
<td>
<table width="100%">
<tbody><tr>
<td></td><th>Issue</th>
</tr>
<tr>
<td class="shortcut"><span class="letter">u</span> <b>:</b></td><td>up to list of issues</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">m</span> <b>:</b></td><td>publish + mail comments</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">j</span> / <span class="letter">k</span> <b>:</b></td><td>jump to patch after / before current patch</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">o</span> / <span class="letter"><Enter></span> <b>:</b></td><td>open current patch in side-by-side view</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">i</span> <b>:</b></td><td>open current patch in unified diff view</td>
</tr>
<tr><td> </td></tr>
<tr><td></td><th>Issue List</th></tr>
<tr>
<td class="shortcut"><span class="letter">j</span> / <span class="letter">k</span> <b>:</b></td><td>jump to issue after / before current issue</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">o</span> / <span class="letter"><Enter></span> <b>:</b></td><td>open current issue</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">#</span> <b>:</b></td>
<td>close issue</td>
</tr>
<tr><td> </td></tr>
<tr>
<td></td><th>Comment/message editing</th>
</tr>
<tr>
<td class="shortcut"><span class="letter"><Ctrl></span> + <span class="letter">s</span> <b>:</b></td><td>save comment</td>
</tr>
<tr>
<td class="shortcut"><span class="letter"><Esc></span> <b>:</b></td><td>cancel edit</td>
</tr>
</tbody></table>
</td>
</tr>
</tbody></table>
</div>
<!-- End help window -->
<div align="right">
<div style="float:left; font-weight:bold"><i>Rietveld</i> Code Review Tool</div>
<b>tomhudson@google.com (TomH)</b>
|
<a class="novisit" href="/settings">Settings</a>
|
<a class="novisit" target="_blank" href="http://code.google.com/p/rietveld/wiki/CodeReviewHelp">Help</a>
|
<a class="novisit" target="_blank" href="http://code.google.com/p/rietveld/issues/list">Bug tracker</a>
|
<a class="novisit" target="_blank" href="http://groups.google.com/group/codereview-discuss">Discussion group</a>
|
<a class="novisit" target="_blank" href="http://code.google.com/p/rietveld">Source code</a>
|
<a class="novisit" href="http://codereview.appspot.com/_ah/logout?continue=https://www.google.com/accounts/Logout%3Fcontinue%3Dhttps://appengine.google.com/_ah/logout%253Fcontinue%253Dhttp://codereview.appspot.com/4571045/%26service%3Dah">Sign out</a>
</div>
<div class="counter">(691)</div>
<div class="mainmenu">
<a href="/" class="active">Issues</a>
<a href="/repos">Repositories</a>
<a href="/search">Search</a>
</div>
<div class="mainmenu2">
<a href="/use_uploadpy">Create Issue</a>
|
<a href="/mine">My Issues</a>
|
<a href="/starred">Starred</a>
|
<a href="/all">Open</a>
|
<a href="/all?closed=1">All</a>
</div>
<div>
<h2>
<span id="issue-star-4571045">
<a href="javascript:M_addIssueStar(4571045)">
<img src="/static/star-dark.gif" width="15" height="15" border="0"></a>
</span>
<span class="issue-close" id="issue-close-4571045">
<a href="javascript:M_closeIssue(4571045)">
<img src="/static/close.gif" title="Close This Issue" width="15" height="15" border="0"></a>
</span>
Issue <a href="/4571045/" onmouseover="M_showPopUp(this, 'popup-issue');">
4571045</a>:
New matrix benchmarks to evaluate ::setConcat implementation options
</h2>
<table class="issue-details" border="0" width="100%">
<tbody><tr valign="top">
<td class="meta" width="20%">
<div>
<a class="novisit" href="/4571045/edit">
Edit Issue
</a>
<br>
<a class="novisit" href="/4571045/publish">
Publish+Mail Comments
</a> ('m')
<br>
<a class="novisit" href="/4571045/diff/1/bench/MatrixBench.cpp">
<b>Start Review</b>
</a>
</div>
<div class="issue_details_sidebar">
<div><b>Created:</b><br>
16 minutes ago by me
</div>
<div><b>Modified:</b><br>
0 minutes ago
</div>
<div><b>Reviewers:</b><br>
<a href="/user/reed1" onmouseover="M_showUserInfoPopup(this)">reed1</a>
</div>
<div><b>CC:</b><br>
</div>
<div><b>Base URL:</b><br>
http://skia.googlecode.com/svn/trunk/
</div>
<div><b>Visibility:</b><br>
Public.
</div>
</div>
</td>
<td style="padding-left: .8em; padding-right: .8em;" width="80%">
<h3><a id="issue-description-pointer" href="javascript:M_toggleSection('issue-description')" class="toggled-section opentriangle">
Description</a></h3>
<div id="issue-description" style="margin-left:15px;">
<pre>On platforms that use Float (instead of Fixed), SkMatrix stores its internal
values as floats, but setConcat() needs extra precision and so uses doubles to
contain intermediate values.
These three benchmarks compare the speed of float-only, double-only, and
float-cast-to-double implementations of a chunk of code extracted from the
non-perspective case of setConcat().
</pre>
</div>
<h3>
<a id="ps-1-pointer" href="javascript:M_toggleSectionForPS('4571045', '1')" class="toggled-section opentriangle">
Patch Set 1
</a>
</h3>
<div id="ps-1" style="">
<div class="issue-list">
<div class="pagination">
<div style="float: left;">
<i>Created:</i> 16 minutes ago
</div>
<div style="float: right;">
<a href="/download/issue4571045_1.diff">
Download raw patch set</a>
</div>
<div style="clear:both;"></div>
</div>
<table id="queues" style="clear:both;">
<tbody><tr align="left">
<th colspan="2"></th>
<th>Unified diffs</th>
<th>Side-by-side diffs</th>
<th>Delta from patch set</th>
<th colspan="3">Stats</th>
<th>Patch</th>
</tr>
<tr name="patch">
<td class="first" width="14"><img src="/static/closedtriangle.gif" style="" width="12" height="9"></td>
<td style="white-space: nowrap">M </td>
<td>
<a class="noul" href="/4571045/patch/1/2">
bench/MatrixBench.cpp
</a>
</td>
<td>
<a class="noul" href="/4571045/diff/1/bench/MatrixBench.cpp">
View
</a>
</td>
<td style="white-space: nowrap">
</td>
<td style="white-space: nowrap">4 chunks</td>
<td style="white-space: nowrap">+114 lines, -3 lines</td>
<td style="white-space: nowrap">
0 comments
</td>
<td>
<a href="/download/issue4571045_1_2.diff" title="Download patch for bench/MatrixBench.cpp">
Download
</a>
</td>
</tr>
</tbody></table>
</div>
</div>
<h3>
<a id="messages-pointer" href="javascript:M_toggleSection('messages')" class="toggled-section opentriangle">
Messages
</a>
</h3>
<div><i>Total messages: 3</i></div>
<div id="messages">
<div style="margin-bottom: .5em;">
<a href="javascript:M_showAllComments('cl', 3)">
Expand All Messages</a>
|
<a href="javascript:M_hideAllComments('cl', 3)">
Collapse All Messages</a>
</div>
<div class="message " id="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UY6QcM" name="0">
<a name="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UY6QcM"></a>
<div class="header">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tbody><tr class="comment_title" onclick="M_switchChangelistComment(0)">
<td style="padding-left: 5px; white-space: nowrap;">
<b>me</b>
</td>
<td width="100%">
<table style="table-layout:fixed; white-space: nowrap;" width="100%">
<tbody><tr>
<td>
<div style="white-space: nowrap; overflow: hidden;" class="extra" id="cl-preview-0">
</div>
</td>
</tr>
</tbody></table>
</td>
<td align="right" style="white-space: nowrap; padding-right: 5px;">
13 minutes ago
</td>
</tr>
</tbody></table>
</div>
<div id="cl-comment-0" style="display: none;">
<div class="message-body">
<pre name="cl-message-0"></pre>
</div>
<div class="message-actions">
<a href="javascript:M_replyToMessage('0', '2011/06/03 18:57:35', 'TomH')" id="message-reply-href-0">Reply</a>
<textarea rows="7" cols="70" name="message" style="display:none"></textarea>
<div id="message-reply-0" style="display:none;"></div>
</div>
</div>
</div>
<div class="message " id="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UY0Q8M" name="1">
<a name="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UY0Q8M"></a>
<div class="header">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tbody><tr class="comment_title" onclick="M_switchChangelistComment(1)">
<td style="padding-left: 5px; white-space: nowrap;">
<b>reed1</b>
</td>
<td width="100%">
<table style="table-layout:fixed; white-space: nowrap;" width="100%">
<tbody><tr>
<td>
<div style="white-space: nowrap; overflow: hidden;" class="extra" id="cl-preview-1">
1. lets remove the "fix" from the function name. just muladdmul I think 2. we ...
</div>
</td>
</tr>
</tbody></table>
</td>
<td align="right" style="white-space: nowrap; padding-right: 5px;">
10 minutes ago
</td>
</tr>
</tbody></table>
</div>
<div id="cl-comment-1" style="display: none;">
<div class="message-body">
<pre name="cl-message-1">1. lets remove the "fix" from the function name. just muladdmul I think
2. we can remove the return, since it will be compiled away anyway
3. nice checkin comment!
4. what are the results like?</pre>
</div>
<div class="message-actions">
<a href="javascript:M_replyToMessage('1', '2011/06/03 19:00:39', 'reed1')" id="message-reply-href-1">Reply</a>
<textarea rows="7" cols="70" name="message" style="display:none"></textarea>
<div id="message-reply-1" style="display:none;"></div>
</div>
</div>
</div>
<div class="message " id="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UYuRcM" name="2">
<a name="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UYuRcM"></a>
<div class="header">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tbody><tr class="comment_title" onclick="M_switchChangelistComment(2)">
<td style="padding-left: 5px; white-space: nowrap;">
<b>me</b>
</td>
<td width="100%">
<table style="table-layout:fixed; white-space: nowrap;" width="100%">
<tbody><tr>
<td>
<div style="white-space: nowrap; overflow: hidden; visibility: hidden;" class="extra" id="cl-preview-2">
> 4. what are the results like? For posterity: tomhudson@tomhudson-zx600-linux:/usr/local/google/src/skia3$ out/bench/bench -match matrix_concat -repeat 1000 ...
</div>
</td>
</tr>
</tbody></table>
</td>
<td align="right" style="white-space: nowrap; padding-right: 5px;">
0 minutes ago
</td>
</tr>
</tbody></table>
</div>
<div id="cl-comment-2">
<div class="message-body">
<pre name="cl-message-2">> 4. what are the results like?
For posterity:
tomhudson@tomhudson-zx600-linux:/usr/local/google/src/skia3$ out/bench/bench
-match matrix_concat -repeat 1000
skia bench: alpha=0xFF antialias=1 filter=0
running bench [640 480] matrix_concat_double 8888: msecs = 0.79 565:
msecs = 0.79 GPU: msecs = 0.79
running bench [640 480] matrix_concat_floatdouble 8888: msecs = 0.97 565:
msecs = 0.97 GPU: msecs = 0.97
running bench [640 480] matrix_concat_float 8888: msecs = 0.74 565:
msecs = 0.73 GPU: msecs = 0.74</pre>
</div>
<div class="message-actions">
<a href="javascript:M_replyToMessage('2', '2011/06/03 19:11:06', 'TomH')" id="message-reply-href-2">Reply</a>
<textarea rows="7" cols="70" name="message" style="display:none"></textarea>
<div id="message-reply-2" style="display:none;"></div>
</div>
</div>
</div>
<div>
<a href="javascript:M_showAllComments('cl', 3)">
Expand All Messages</a>
|
<a href="javascript:M_hideAllComments('cl', 3)">
Collapse All Messages</a>
</div>
</div>
<script language="JavaScript" type="text/javascript">
<!--
document.onkeydown = M_changelistKeyDown;
var dashboardState = new M_DashboardState(window, 'patch', 'M_CLPatchMarker');
M_switchChangelistCommentByAnchor();
// -->
</script>
<div style="display:none;">
<form method="POST" action="/4571045/publish" id="message-reply-form">
<input type="hidden" name="xsrf_token" value="dd5d1a57ca1d5440593050fdc596d377">
<div></div>
<input type="hidden" name="subject" value="New matrix benchmarks to evaluate ::setConcat implementation options">
<input type="hidden" name="message_only" value="1">
<input type="submit" value="Send Message">
<input type="button" value="Discard" name="discard">
<input type="checkbox" name="send_mail" value="1" id="message-reply-send-mail" checked="checked">
<label>Send mail to reviewers</label>
</form>
</div>
<a id="resizer" class="resizer" style="display:none;cursor:pointer">
<img src="/static/zippyplus.gif">
</a>
</td>
</tr>
</tbody></table>
</div>
<div class="popup" id="popup-issue" style="left: 104px; top: 116px; visibility: hidden; ">
<b>Issue 4571045: New matrix benchmarks to evaluate ::setConcat implementation options
</b><br>
Created 16 minutes ago by me<br>
Modified 0 minutes ago<br>
Reviewers: reed1<br>
Base URL: http://skia.googlecode.com/svn/trunk/<br>
Comments: 0
</div>
<p></p>
<div style="float: left;">
<a target="_blank" href="http://code.google.com/appengine/"><img border="0" src="/static/appengine-noborder-120x30.gif" alt="Powered by Google App Engine"></a>
</div>
<div class="extra" style="font-size: 9pt; float: right; text-align: right;">
<div style="height:14px;">
<img src="/static/rss.gif" alt="RSS Feeds" width="14" height="14" align="top">
<a href="/rss/all">Recent Issues</a>
|
<a href="/rss/mine/TomH">My Issues</a>
|
<a href="/rss/reviews/TomH">My Reviews</a>
|
<a href="/rss/closed/TomH">My Closed</a>
|
<a href="/rss/issue/4571045">This issue</a>
</div>
<div style="margin-top: .3em;">This is Rietveld <a href="http://code.google.com/p/rietveld/updates/list">r756
</a></div>
</div>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script><script src="http://www.google-analytics.com/ga.js" type="text/javascript"></script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-4803694-4");
pageTracker._initData();
pageTracker._trackPageview();
</script>
On platforms that use Float (instead of Fixed), SkMatrix stores its internal
values as floats, but setConcat() needs extra precision and so uses doubles
to contain intermediate values.
These three benchmarks compare the speed of float-only, double-only, and
float-cast-to-double implementations of a chunk of code extracted from the
non-perspective case of setConcat().
git-svn-id: http://skia.googlecode.com/svn/trunk@1497 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-06-03 19:16:56 +00:00
|
|
|
muladdmul(a[0], b[0], a[1], b[3], &r[0]);
|
|
|
|
muladdmul(a[0], b[1], a[1], b[4], &r[1]);
|
|
|
|
muladdmul(a[0], b[2], a[1], b[5], &r[2]);
|
2011-06-03 20:32:58 +00:00
|
|
|
r[2] += a[2];
|
<body onunload="M_unloadPage();">
<!-- Begin help window -->
<script type="text/javascript"><!--
var xsrfToken = 'dd5d1a57ca1d5440593050fdc596d377';
var helpDisplayed = false;
document.onclick = M_clickCommon;
var media_url = "/static/";
var base_url = "/";
var publish_link = "/4571045/publish";
// -->
</script>
<div id="help" style="display: none;">
<div style="font-size: medium; text-align: center;">Keyboard Shortcuts</div>
<hr>
<table width="100%">
<tbody><tr valign="top">
<td>
<table width="100%">
<tbody><tr>
<td></td><th>File</th>
</tr>
<tr>
<td class="shortcut"><span class="letter">u</span> <b>:</b></td><td>up to issue</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">m</span> <b>:</b></td><td>publish + mail comments</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">M</span> <b>:</b></td><td>edit review message</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">j</span> / <span class="letter">k</span> <b>:</b></td><td>jump to file after / before current file</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">J</span> / <span class="letter">K</span> <b>:</b></td><td>jump to next file with a comment after / before current file</td>
</tr>
<tr>
<td></td><th>Side-by-side diff</th>
</tr>
<tr>
<td class="shortcut"><span class="letter">i</span> <b>:</b></td><td>toggle intra-line diffs</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">e</span> <b>:</b></td><td>expand all comments</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">c</span> <b>:</b></td><td>collapse all comments</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">s</span> <b>:</b></td><td>toggle showing all comments</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">n</span> / <span class="letter">p</span> <b>:</b></td><td>next / previous diff chunk or comment</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">N</span> / <span class="letter">P</span> <b>:</b></td><td>next / previous comment</td>
</tr>
<tr>
<td class="shortcut"><span class="letter"><Enter></span> <b>:</b></td><td>respond to / edit current comment</td>
</tr>
</tbody></table>
</td>
<td>
<table width="100%">
<tbody><tr>
<td></td><th>Issue</th>
</tr>
<tr>
<td class="shortcut"><span class="letter">u</span> <b>:</b></td><td>up to list of issues</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">m</span> <b>:</b></td><td>publish + mail comments</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">j</span> / <span class="letter">k</span> <b>:</b></td><td>jump to patch after / before current patch</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">o</span> / <span class="letter"><Enter></span> <b>:</b></td><td>open current patch in side-by-side view</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">i</span> <b>:</b></td><td>open current patch in unified diff view</td>
</tr>
<tr><td> </td></tr>
<tr><td></td><th>Issue List</th></tr>
<tr>
<td class="shortcut"><span class="letter">j</span> / <span class="letter">k</span> <b>:</b></td><td>jump to issue after / before current issue</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">o</span> / <span class="letter"><Enter></span> <b>:</b></td><td>open current issue</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">#</span> <b>:</b></td>
<td>close issue</td>
</tr>
<tr><td> </td></tr>
<tr>
<td></td><th>Comment/message editing</th>
</tr>
<tr>
<td class="shortcut"><span class="letter"><Ctrl></span> + <span class="letter">s</span> <b>:</b></td><td>save comment</td>
</tr>
<tr>
<td class="shortcut"><span class="letter"><Esc></span> <b>:</b></td><td>cancel edit</td>
</tr>
</tbody></table>
</td>
</tr>
</tbody></table>
</div>
<!-- End help window -->
<div align="right">
<div style="float:left; font-weight:bold"><i>Rietveld</i> Code Review Tool</div>
<b>tomhudson@google.com (TomH)</b>
|
<a class="novisit" href="/settings">Settings</a>
|
<a class="novisit" target="_blank" href="http://code.google.com/p/rietveld/wiki/CodeReviewHelp">Help</a>
|
<a class="novisit" target="_blank" href="http://code.google.com/p/rietveld/issues/list">Bug tracker</a>
|
<a class="novisit" target="_blank" href="http://groups.google.com/group/codereview-discuss">Discussion group</a>
|
<a class="novisit" target="_blank" href="http://code.google.com/p/rietveld">Source code</a>
|
<a class="novisit" href="http://codereview.appspot.com/_ah/logout?continue=https://www.google.com/accounts/Logout%3Fcontinue%3Dhttps://appengine.google.com/_ah/logout%253Fcontinue%253Dhttp://codereview.appspot.com/4571045/%26service%3Dah">Sign out</a>
</div>
<div class="counter">(691)</div>
<div class="mainmenu">
<a href="/" class="active">Issues</a>
<a href="/repos">Repositories</a>
<a href="/search">Search</a>
</div>
<div class="mainmenu2">
<a href="/use_uploadpy">Create Issue</a>
|
<a href="/mine">My Issues</a>
|
<a href="/starred">Starred</a>
|
<a href="/all">Open</a>
|
<a href="/all?closed=1">All</a>
</div>
<div>
<h2>
<span id="issue-star-4571045">
<a href="javascript:M_addIssueStar(4571045)">
<img src="/static/star-dark.gif" width="15" height="15" border="0"></a>
</span>
<span class="issue-close" id="issue-close-4571045">
<a href="javascript:M_closeIssue(4571045)">
<img src="/static/close.gif" title="Close This Issue" width="15" height="15" border="0"></a>
</span>
Issue <a href="/4571045/" onmouseover="M_showPopUp(this, 'popup-issue');">
4571045</a>:
New matrix benchmarks to evaluate ::setConcat implementation options
</h2>
<table class="issue-details" border="0" width="100%">
<tbody><tr valign="top">
<td class="meta" width="20%">
<div>
<a class="novisit" href="/4571045/edit">
Edit Issue
</a>
<br>
<a class="novisit" href="/4571045/publish">
Publish+Mail Comments
</a> ('m')
<br>
<a class="novisit" href="/4571045/diff/1/bench/MatrixBench.cpp">
<b>Start Review</b>
</a>
</div>
<div class="issue_details_sidebar">
<div><b>Created:</b><br>
16 minutes ago by me
</div>
<div><b>Modified:</b><br>
0 minutes ago
</div>
<div><b>Reviewers:</b><br>
<a href="/user/reed1" onmouseover="M_showUserInfoPopup(this)">reed1</a>
</div>
<div><b>CC:</b><br>
</div>
<div><b>Base URL:</b><br>
http://skia.googlecode.com/svn/trunk/
</div>
<div><b>Visibility:</b><br>
Public.
</div>
</div>
</td>
<td style="padding-left: .8em; padding-right: .8em;" width="80%">
<h3><a id="issue-description-pointer" href="javascript:M_toggleSection('issue-description')" class="toggled-section opentriangle">
Description</a></h3>
<div id="issue-description" style="margin-left:15px;">
<pre>On platforms that use Float (instead of Fixed), SkMatrix stores its internal
values as floats, but setConcat() needs extra precision and so uses doubles to
contain intermediate values.
These three benchmarks compare the speed of float-only, double-only, and
float-cast-to-double implementations of a chunk of code extracted from the
non-perspective case of setConcat().
</pre>
</div>
<h3>
<a id="ps-1-pointer" href="javascript:M_toggleSectionForPS('4571045', '1')" class="toggled-section opentriangle">
Patch Set 1
</a>
</h3>
<div id="ps-1" style="">
<div class="issue-list">
<div class="pagination">
<div style="float: left;">
<i>Created:</i> 16 minutes ago
</div>
<div style="float: right;">
<a href="/download/issue4571045_1.diff">
Download raw patch set</a>
</div>
<div style="clear:both;"></div>
</div>
<table id="queues" style="clear:both;">
<tbody><tr align="left">
<th colspan="2"></th>
<th>Unified diffs</th>
<th>Side-by-side diffs</th>
<th>Delta from patch set</th>
<th colspan="3">Stats</th>
<th>Patch</th>
</tr>
<tr name="patch">
<td class="first" width="14"><img src="/static/closedtriangle.gif" style="" width="12" height="9"></td>
<td style="white-space: nowrap">M </td>
<td>
<a class="noul" href="/4571045/patch/1/2">
bench/MatrixBench.cpp
</a>
</td>
<td>
<a class="noul" href="/4571045/diff/1/bench/MatrixBench.cpp">
View
</a>
</td>
<td style="white-space: nowrap">
</td>
<td style="white-space: nowrap">4 chunks</td>
<td style="white-space: nowrap">+114 lines, -3 lines</td>
<td style="white-space: nowrap">
0 comments
</td>
<td>
<a href="/download/issue4571045_1_2.diff" title="Download patch for bench/MatrixBench.cpp">
Download
</a>
</td>
</tr>
</tbody></table>
</div>
</div>
<h3>
<a id="messages-pointer" href="javascript:M_toggleSection('messages')" class="toggled-section opentriangle">
Messages
</a>
</h3>
<div><i>Total messages: 3</i></div>
<div id="messages">
<div style="margin-bottom: .5em;">
<a href="javascript:M_showAllComments('cl', 3)">
Expand All Messages</a>
|
<a href="javascript:M_hideAllComments('cl', 3)">
Collapse All Messages</a>
</div>
<div class="message " id="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UY6QcM" name="0">
<a name="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UY6QcM"></a>
<div class="header">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tbody><tr class="comment_title" onclick="M_switchChangelistComment(0)">
<td style="padding-left: 5px; white-space: nowrap;">
<b>me</b>
</td>
<td width="100%">
<table style="table-layout:fixed; white-space: nowrap;" width="100%">
<tbody><tr>
<td>
<div style="white-space: nowrap; overflow: hidden;" class="extra" id="cl-preview-0">
</div>
</td>
</tr>
</tbody></table>
</td>
<td align="right" style="white-space: nowrap; padding-right: 5px;">
13 minutes ago
</td>
</tr>
</tbody></table>
</div>
<div id="cl-comment-0" style="display: none;">
<div class="message-body">
<pre name="cl-message-0"></pre>
</div>
<div class="message-actions">
<a href="javascript:M_replyToMessage('0', '2011/06/03 18:57:35', 'TomH')" id="message-reply-href-0">Reply</a>
<textarea rows="7" cols="70" name="message" style="display:none"></textarea>
<div id="message-reply-0" style="display:none;"></div>
</div>
</div>
</div>
<div class="message " id="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UY0Q8M" name="1">
<a name="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UY0Q8M"></a>
<div class="header">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tbody><tr class="comment_title" onclick="M_switchChangelistComment(1)">
<td style="padding-left: 5px; white-space: nowrap;">
<b>reed1</b>
</td>
<td width="100%">
<table style="table-layout:fixed; white-space: nowrap;" width="100%">
<tbody><tr>
<td>
<div style="white-space: nowrap; overflow: hidden;" class="extra" id="cl-preview-1">
1. lets remove the "fix" from the function name. just muladdmul I think 2. we ...
</div>
</td>
</tr>
</tbody></table>
</td>
<td align="right" style="white-space: nowrap; padding-right: 5px;">
10 minutes ago
</td>
</tr>
</tbody></table>
</div>
<div id="cl-comment-1" style="display: none;">
<div class="message-body">
<pre name="cl-message-1">1. lets remove the "fix" from the function name. just muladdmul I think
2. we can remove the return, since it will be compiled away anyway
3. nice checkin comment!
4. what are the results like?</pre>
</div>
<div class="message-actions">
<a href="javascript:M_replyToMessage('1', '2011/06/03 19:00:39', 'reed1')" id="message-reply-href-1">Reply</a>
<textarea rows="7" cols="70" name="message" style="display:none"></textarea>
<div id="message-reply-1" style="display:none;"></div>
</div>
</div>
</div>
<div class="message " id="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UYuRcM" name="2">
<a name="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UYuRcM"></a>
<div class="header">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tbody><tr class="comment_title" onclick="M_switchChangelistComment(2)">
<td style="padding-left: 5px; white-space: nowrap;">
<b>me</b>
</td>
<td width="100%">
<table style="table-layout:fixed; white-space: nowrap;" width="100%">
<tbody><tr>
<td>
<div style="white-space: nowrap; overflow: hidden; visibility: hidden;" class="extra" id="cl-preview-2">
> 4. what are the results like? For posterity: tomhudson@tomhudson-zx600-linux:/usr/local/google/src/skia3$ out/bench/bench -match matrix_concat -repeat 1000 ...
</div>
</td>
</tr>
</tbody></table>
</td>
<td align="right" style="white-space: nowrap; padding-right: 5px;">
0 minutes ago
</td>
</tr>
</tbody></table>
</div>
<div id="cl-comment-2">
<div class="message-body">
<pre name="cl-message-2">> 4. what are the results like?
For posterity:
tomhudson@tomhudson-zx600-linux:/usr/local/google/src/skia3$ out/bench/bench
-match matrix_concat -repeat 1000
skia bench: alpha=0xFF antialias=1 filter=0
running bench [640 480] matrix_concat_double 8888: msecs = 0.79 565:
msecs = 0.79 GPU: msecs = 0.79
running bench [640 480] matrix_concat_floatdouble 8888: msecs = 0.97 565:
msecs = 0.97 GPU: msecs = 0.97
running bench [640 480] matrix_concat_float 8888: msecs = 0.74 565:
msecs = 0.73 GPU: msecs = 0.74</pre>
</div>
<div class="message-actions">
<a href="javascript:M_replyToMessage('2', '2011/06/03 19:11:06', 'TomH')" id="message-reply-href-2">Reply</a>
<textarea rows="7" cols="70" name="message" style="display:none"></textarea>
<div id="message-reply-2" style="display:none;"></div>
</div>
</div>
</div>
<div>
<a href="javascript:M_showAllComments('cl', 3)">
Expand All Messages</a>
|
<a href="javascript:M_hideAllComments('cl', 3)">
Collapse All Messages</a>
</div>
</div>
<script language="JavaScript" type="text/javascript">
<!--
document.onkeydown = M_changelistKeyDown;
var dashboardState = new M_DashboardState(window, 'patch', 'M_CLPatchMarker');
M_switchChangelistCommentByAnchor();
// -->
</script>
<div style="display:none;">
<form method="POST" action="/4571045/publish" id="message-reply-form">
<input type="hidden" name="xsrf_token" value="dd5d1a57ca1d5440593050fdc596d377">
<div></div>
<input type="hidden" name="subject" value="New matrix benchmarks to evaluate ::setConcat implementation options">
<input type="hidden" name="message_only" value="1">
<input type="submit" value="Send Message">
<input type="button" value="Discard" name="discard">
<input type="checkbox" name="send_mail" value="1" id="message-reply-send-mail" checked="checked">
<label>Send mail to reviewers</label>
</form>
</div>
<a id="resizer" class="resizer" style="display:none;cursor:pointer">
<img src="/static/zippyplus.gif">
</a>
</td>
</tr>
</tbody></table>
</div>
<div class="popup" id="popup-issue" style="left: 104px; top: 116px; visibility: hidden; ">
<b>Issue 4571045: New matrix benchmarks to evaluate ::setConcat implementation options
</b><br>
Created 16 minutes ago by me<br>
Modified 0 minutes ago<br>
Reviewers: reed1<br>
Base URL: http://skia.googlecode.com/svn/trunk/<br>
Comments: 0
</div>
<p></p>
<div style="float: left;">
<a target="_blank" href="http://code.google.com/appengine/"><img border="0" src="/static/appengine-noborder-120x30.gif" alt="Powered by Google App Engine"></a>
</div>
<div class="extra" style="font-size: 9pt; float: right; text-align: right;">
<div style="height:14px;">
<img src="/static/rss.gif" alt="RSS Feeds" width="14" height="14" align="top">
<a href="/rss/all">Recent Issues</a>
|
<a href="/rss/mine/TomH">My Issues</a>
|
<a href="/rss/reviews/TomH">My Reviews</a>
|
<a href="/rss/closed/TomH">My Closed</a>
|
<a href="/rss/issue/4571045">This issue</a>
</div>
<div style="margin-top: .3em;">This is Rietveld <a href="http://code.google.com/p/rietveld/updates/list">r756
</a></div>
</div>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script><script src="http://www.google-analytics.com/ga.js" type="text/javascript"></script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-4803694-4");
pageTracker._initData();
pageTracker._trackPageview();
</script>
On platforms that use Float (instead of Fixed), SkMatrix stores its internal
values as floats, but setConcat() needs extra precision and so uses doubles
to contain intermediate values.
These three benchmarks compare the speed of float-only, double-only, and
float-cast-to-double implementations of a chunk of code extracted from the
non-perspective case of setConcat().
git-svn-id: http://skia.googlecode.com/svn/trunk@1497 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-06-03 19:16:56 +00:00
|
|
|
muladdmul(a[3], b[0], a[4], b[3], &r[3]);
|
|
|
|
muladdmul(a[3], b[1], a[4], b[4], &r[4]);
|
|
|
|
muladdmul(a[3], b[2], a[4], b[5], &r[5]);
|
2011-06-03 20:32:58 +00:00
|
|
|
r[5] += a[5];
|
|
|
|
r[6] = r[7] = 0.0f;
|
|
|
|
r[8] = 1.0f;
|
<body onunload="M_unloadPage();">
<!-- Begin help window -->
<script type="text/javascript"><!--
var xsrfToken = 'dd5d1a57ca1d5440593050fdc596d377';
var helpDisplayed = false;
document.onclick = M_clickCommon;
var media_url = "/static/";
var base_url = "/";
var publish_link = "/4571045/publish";
// -->
</script>
<div id="help" style="display: none;">
<div style="font-size: medium; text-align: center;">Keyboard Shortcuts</div>
<hr>
<table width="100%">
<tbody><tr valign="top">
<td>
<table width="100%">
<tbody><tr>
<td></td><th>File</th>
</tr>
<tr>
<td class="shortcut"><span class="letter">u</span> <b>:</b></td><td>up to issue</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">m</span> <b>:</b></td><td>publish + mail comments</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">M</span> <b>:</b></td><td>edit review message</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">j</span> / <span class="letter">k</span> <b>:</b></td><td>jump to file after / before current file</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">J</span> / <span class="letter">K</span> <b>:</b></td><td>jump to next file with a comment after / before current file</td>
</tr>
<tr>
<td></td><th>Side-by-side diff</th>
</tr>
<tr>
<td class="shortcut"><span class="letter">i</span> <b>:</b></td><td>toggle intra-line diffs</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">e</span> <b>:</b></td><td>expand all comments</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">c</span> <b>:</b></td><td>collapse all comments</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">s</span> <b>:</b></td><td>toggle showing all comments</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">n</span> / <span class="letter">p</span> <b>:</b></td><td>next / previous diff chunk or comment</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">N</span> / <span class="letter">P</span> <b>:</b></td><td>next / previous comment</td>
</tr>
<tr>
<td class="shortcut"><span class="letter"><Enter></span> <b>:</b></td><td>respond to / edit current comment</td>
</tr>
</tbody></table>
</td>
<td>
<table width="100%">
<tbody><tr>
<td></td><th>Issue</th>
</tr>
<tr>
<td class="shortcut"><span class="letter">u</span> <b>:</b></td><td>up to list of issues</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">m</span> <b>:</b></td><td>publish + mail comments</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">j</span> / <span class="letter">k</span> <b>:</b></td><td>jump to patch after / before current patch</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">o</span> / <span class="letter"><Enter></span> <b>:</b></td><td>open current patch in side-by-side view</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">i</span> <b>:</b></td><td>open current patch in unified diff view</td>
</tr>
<tr><td> </td></tr>
<tr><td></td><th>Issue List</th></tr>
<tr>
<td class="shortcut"><span class="letter">j</span> / <span class="letter">k</span> <b>:</b></td><td>jump to issue after / before current issue</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">o</span> / <span class="letter"><Enter></span> <b>:</b></td><td>open current issue</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">#</span> <b>:</b></td>
<td>close issue</td>
</tr>
<tr><td> </td></tr>
<tr>
<td></td><th>Comment/message editing</th>
</tr>
<tr>
<td class="shortcut"><span class="letter"><Ctrl></span> + <span class="letter">s</span> <b>:</b></td><td>save comment</td>
</tr>
<tr>
<td class="shortcut"><span class="letter"><Esc></span> <b>:</b></td><td>cancel edit</td>
</tr>
</tbody></table>
</td>
</tr>
</tbody></table>
</div>
<!-- End help window -->
<div align="right">
<div style="float:left; font-weight:bold"><i>Rietveld</i> Code Review Tool</div>
<b>tomhudson@google.com (TomH)</b>
|
<a class="novisit" href="/settings">Settings</a>
|
<a class="novisit" target="_blank" href="http://code.google.com/p/rietveld/wiki/CodeReviewHelp">Help</a>
|
<a class="novisit" target="_blank" href="http://code.google.com/p/rietveld/issues/list">Bug tracker</a>
|
<a class="novisit" target="_blank" href="http://groups.google.com/group/codereview-discuss">Discussion group</a>
|
<a class="novisit" target="_blank" href="http://code.google.com/p/rietveld">Source code</a>
|
<a class="novisit" href="http://codereview.appspot.com/_ah/logout?continue=https://www.google.com/accounts/Logout%3Fcontinue%3Dhttps://appengine.google.com/_ah/logout%253Fcontinue%253Dhttp://codereview.appspot.com/4571045/%26service%3Dah">Sign out</a>
</div>
<div class="counter">(691)</div>
<div class="mainmenu">
<a href="/" class="active">Issues</a>
<a href="/repos">Repositories</a>
<a href="/search">Search</a>
</div>
<div class="mainmenu2">
<a href="/use_uploadpy">Create Issue</a>
|
<a href="/mine">My Issues</a>
|
<a href="/starred">Starred</a>
|
<a href="/all">Open</a>
|
<a href="/all?closed=1">All</a>
</div>
<div>
<h2>
<span id="issue-star-4571045">
<a href="javascript:M_addIssueStar(4571045)">
<img src="/static/star-dark.gif" width="15" height="15" border="0"></a>
</span>
<span class="issue-close" id="issue-close-4571045">
<a href="javascript:M_closeIssue(4571045)">
<img src="/static/close.gif" title="Close This Issue" width="15" height="15" border="0"></a>
</span>
Issue <a href="/4571045/" onmouseover="M_showPopUp(this, 'popup-issue');">
4571045</a>:
New matrix benchmarks to evaluate ::setConcat implementation options
</h2>
<table class="issue-details" border="0" width="100%">
<tbody><tr valign="top">
<td class="meta" width="20%">
<div>
<a class="novisit" href="/4571045/edit">
Edit Issue
</a>
<br>
<a class="novisit" href="/4571045/publish">
Publish+Mail Comments
</a> ('m')
<br>
<a class="novisit" href="/4571045/diff/1/bench/MatrixBench.cpp">
<b>Start Review</b>
</a>
</div>
<div class="issue_details_sidebar">
<div><b>Created:</b><br>
16 minutes ago by me
</div>
<div><b>Modified:</b><br>
0 minutes ago
</div>
<div><b>Reviewers:</b><br>
<a href="/user/reed1" onmouseover="M_showUserInfoPopup(this)">reed1</a>
</div>
<div><b>CC:</b><br>
</div>
<div><b>Base URL:</b><br>
http://skia.googlecode.com/svn/trunk/
</div>
<div><b>Visibility:</b><br>
Public.
</div>
</div>
</td>
<td style="padding-left: .8em; padding-right: .8em;" width="80%">
<h3><a id="issue-description-pointer" href="javascript:M_toggleSection('issue-description')" class="toggled-section opentriangle">
Description</a></h3>
<div id="issue-description" style="margin-left:15px;">
<pre>On platforms that use Float (instead of Fixed), SkMatrix stores its internal
values as floats, but setConcat() needs extra precision and so uses doubles to
contain intermediate values.
These three benchmarks compare the speed of float-only, double-only, and
float-cast-to-double implementations of a chunk of code extracted from the
non-perspective case of setConcat().
</pre>
</div>
<h3>
<a id="ps-1-pointer" href="javascript:M_toggleSectionForPS('4571045', '1')" class="toggled-section opentriangle">
Patch Set 1
</a>
</h3>
<div id="ps-1" style="">
<div class="issue-list">
<div class="pagination">
<div style="float: left;">
<i>Created:</i> 16 minutes ago
</div>
<div style="float: right;">
<a href="/download/issue4571045_1.diff">
Download raw patch set</a>
</div>
<div style="clear:both;"></div>
</div>
<table id="queues" style="clear:both;">
<tbody><tr align="left">
<th colspan="2"></th>
<th>Unified diffs</th>
<th>Side-by-side diffs</th>
<th>Delta from patch set</th>
<th colspan="3">Stats</th>
<th>Patch</th>
</tr>
<tr name="patch">
<td class="first" width="14"><img src="/static/closedtriangle.gif" style="" width="12" height="9"></td>
<td style="white-space: nowrap">M </td>
<td>
<a class="noul" href="/4571045/patch/1/2">
bench/MatrixBench.cpp
</a>
</td>
<td>
<a class="noul" href="/4571045/diff/1/bench/MatrixBench.cpp">
View
</a>
</td>
<td style="white-space: nowrap">
</td>
<td style="white-space: nowrap">4 chunks</td>
<td style="white-space: nowrap">+114 lines, -3 lines</td>
<td style="white-space: nowrap">
0 comments
</td>
<td>
<a href="/download/issue4571045_1_2.diff" title="Download patch for bench/MatrixBench.cpp">
Download
</a>
</td>
</tr>
</tbody></table>
</div>
</div>
<h3>
<a id="messages-pointer" href="javascript:M_toggleSection('messages')" class="toggled-section opentriangle">
Messages
</a>
</h3>
<div><i>Total messages: 3</i></div>
<div id="messages">
<div style="margin-bottom: .5em;">
<a href="javascript:M_showAllComments('cl', 3)">
Expand All Messages</a>
|
<a href="javascript:M_hideAllComments('cl', 3)">
Collapse All Messages</a>
</div>
<div class="message " id="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UY6QcM" name="0">
<a name="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UY6QcM"></a>
<div class="header">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tbody><tr class="comment_title" onclick="M_switchChangelistComment(0)">
<td style="padding-left: 5px; white-space: nowrap;">
<b>me</b>
</td>
<td width="100%">
<table style="table-layout:fixed; white-space: nowrap;" width="100%">
<tbody><tr>
<td>
<div style="white-space: nowrap; overflow: hidden;" class="extra" id="cl-preview-0">
</div>
</td>
</tr>
</tbody></table>
</td>
<td align="right" style="white-space: nowrap; padding-right: 5px;">
13 minutes ago
</td>
</tr>
</tbody></table>
</div>
<div id="cl-comment-0" style="display: none;">
<div class="message-body">
<pre name="cl-message-0"></pre>
</div>
<div class="message-actions">
<a href="javascript:M_replyToMessage('0', '2011/06/03 18:57:35', 'TomH')" id="message-reply-href-0">Reply</a>
<textarea rows="7" cols="70" name="message" style="display:none"></textarea>
<div id="message-reply-0" style="display:none;"></div>
</div>
</div>
</div>
<div class="message " id="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UY0Q8M" name="1">
<a name="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UY0Q8M"></a>
<div class="header">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tbody><tr class="comment_title" onclick="M_switchChangelistComment(1)">
<td style="padding-left: 5px; white-space: nowrap;">
<b>reed1</b>
</td>
<td width="100%">
<table style="table-layout:fixed; white-space: nowrap;" width="100%">
<tbody><tr>
<td>
<div style="white-space: nowrap; overflow: hidden;" class="extra" id="cl-preview-1">
1. lets remove the "fix" from the function name. just muladdmul I think 2. we ...
</div>
</td>
</tr>
</tbody></table>
</td>
<td align="right" style="white-space: nowrap; padding-right: 5px;">
10 minutes ago
</td>
</tr>
</tbody></table>
</div>
<div id="cl-comment-1" style="display: none;">
<div class="message-body">
<pre name="cl-message-1">1. lets remove the "fix" from the function name. just muladdmul I think
2. we can remove the return, since it will be compiled away anyway
3. nice checkin comment!
4. what are the results like?</pre>
</div>
<div class="message-actions">
<a href="javascript:M_replyToMessage('1', '2011/06/03 19:00:39', 'reed1')" id="message-reply-href-1">Reply</a>
<textarea rows="7" cols="70" name="message" style="display:none"></textarea>
<div id="message-reply-1" style="display:none;"></div>
</div>
</div>
</div>
<div class="message " id="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UYuRcM" name="2">
<a name="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UYuRcM"></a>
<div class="header">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tbody><tr class="comment_title" onclick="M_switchChangelistComment(2)">
<td style="padding-left: 5px; white-space: nowrap;">
<b>me</b>
</td>
<td width="100%">
<table style="table-layout:fixed; white-space: nowrap;" width="100%">
<tbody><tr>
<td>
<div style="white-space: nowrap; overflow: hidden; visibility: hidden;" class="extra" id="cl-preview-2">
> 4. what are the results like? For posterity: tomhudson@tomhudson-zx600-linux:/usr/local/google/src/skia3$ out/bench/bench -match matrix_concat -repeat 1000 ...
</div>
</td>
</tr>
</tbody></table>
</td>
<td align="right" style="white-space: nowrap; padding-right: 5px;">
0 minutes ago
</td>
</tr>
</tbody></table>
</div>
<div id="cl-comment-2">
<div class="message-body">
<pre name="cl-message-2">> 4. what are the results like?
For posterity:
tomhudson@tomhudson-zx600-linux:/usr/local/google/src/skia3$ out/bench/bench
-match matrix_concat -repeat 1000
skia bench: alpha=0xFF antialias=1 filter=0
running bench [640 480] matrix_concat_double 8888: msecs = 0.79 565:
msecs = 0.79 GPU: msecs = 0.79
running bench [640 480] matrix_concat_floatdouble 8888: msecs = 0.97 565:
msecs = 0.97 GPU: msecs = 0.97
running bench [640 480] matrix_concat_float 8888: msecs = 0.74 565:
msecs = 0.73 GPU: msecs = 0.74</pre>
</div>
<div class="message-actions">
<a href="javascript:M_replyToMessage('2', '2011/06/03 19:11:06', 'TomH')" id="message-reply-href-2">Reply</a>
<textarea rows="7" cols="70" name="message" style="display:none"></textarea>
<div id="message-reply-2" style="display:none;"></div>
</div>
</div>
</div>
<div>
<a href="javascript:M_showAllComments('cl', 3)">
Expand All Messages</a>
|
<a href="javascript:M_hideAllComments('cl', 3)">
Collapse All Messages</a>
</div>
</div>
<script language="JavaScript" type="text/javascript">
<!--
document.onkeydown = M_changelistKeyDown;
var dashboardState = new M_DashboardState(window, 'patch', 'M_CLPatchMarker');
M_switchChangelistCommentByAnchor();
// -->
</script>
<div style="display:none;">
<form method="POST" action="/4571045/publish" id="message-reply-form">
<input type="hidden" name="xsrf_token" value="dd5d1a57ca1d5440593050fdc596d377">
<div></div>
<input type="hidden" name="subject" value="New matrix benchmarks to evaluate ::setConcat implementation options">
<input type="hidden" name="message_only" value="1">
<input type="submit" value="Send Message">
<input type="button" value="Discard" name="discard">
<input type="checkbox" name="send_mail" value="1" id="message-reply-send-mail" checked="checked">
<label>Send mail to reviewers</label>
</form>
</div>
<a id="resizer" class="resizer" style="display:none;cursor:pointer">
<img src="/static/zippyplus.gif">
</a>
</td>
</tr>
</tbody></table>
</div>
<div class="popup" id="popup-issue" style="left: 104px; top: 116px; visibility: hidden; ">
<b>Issue 4571045: New matrix benchmarks to evaluate ::setConcat implementation options
</b><br>
Created 16 minutes ago by me<br>
Modified 0 minutes ago<br>
Reviewers: reed1<br>
Base URL: http://skia.googlecode.com/svn/trunk/<br>
Comments: 0
</div>
<p></p>
<div style="float: left;">
<a target="_blank" href="http://code.google.com/appengine/"><img border="0" src="/static/appengine-noborder-120x30.gif" alt="Powered by Google App Engine"></a>
</div>
<div class="extra" style="font-size: 9pt; float: right; text-align: right;">
<div style="height:14px;">
<img src="/static/rss.gif" alt="RSS Feeds" width="14" height="14" align="top">
<a href="/rss/all">Recent Issues</a>
|
<a href="/rss/mine/TomH">My Issues</a>
|
<a href="/rss/reviews/TomH">My Reviews</a>
|
<a href="/rss/closed/TomH">My Closed</a>
|
<a href="/rss/issue/4571045">This issue</a>
</div>
<div style="margin-top: .3em;">This is Rietveld <a href="http://code.google.com/p/rietveld/updates/list">r756
</a></div>
</div>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script><script src="http://www.google-analytics.com/ga.js" type="text/javascript"></script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-4803694-4");
pageTracker._initData();
pageTracker._trackPageview();
</script>
On platforms that use Float (instead of Fixed), SkMatrix stores its internal
values as floats, but setConcat() needs extra precision and so uses doubles
to contain intermediate values.
These three benchmarks compare the speed of float-only, double-only, and
float-cast-to-double implementations of a chunk of code extracted from the
non-perspective case of setConcat().
git-svn-id: http://skia.googlecode.com/svn/trunk@1497 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-06-03 19:16:56 +00:00
|
|
|
}
|
|
|
|
private:
|
2011-06-03 20:32:58 +00:00
|
|
|
float mya [9];
|
|
|
|
float myb [9];
|
|
|
|
float myr [9];
|
<body onunload="M_unloadPage();">
<!-- Begin help window -->
<script type="text/javascript"><!--
var xsrfToken = 'dd5d1a57ca1d5440593050fdc596d377';
var helpDisplayed = false;
document.onclick = M_clickCommon;
var media_url = "/static/";
var base_url = "/";
var publish_link = "/4571045/publish";
// -->
</script>
<div id="help" style="display: none;">
<div style="font-size: medium; text-align: center;">Keyboard Shortcuts</div>
<hr>
<table width="100%">
<tbody><tr valign="top">
<td>
<table width="100%">
<tbody><tr>
<td></td><th>File</th>
</tr>
<tr>
<td class="shortcut"><span class="letter">u</span> <b>:</b></td><td>up to issue</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">m</span> <b>:</b></td><td>publish + mail comments</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">M</span> <b>:</b></td><td>edit review message</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">j</span> / <span class="letter">k</span> <b>:</b></td><td>jump to file after / before current file</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">J</span> / <span class="letter">K</span> <b>:</b></td><td>jump to next file with a comment after / before current file</td>
</tr>
<tr>
<td></td><th>Side-by-side diff</th>
</tr>
<tr>
<td class="shortcut"><span class="letter">i</span> <b>:</b></td><td>toggle intra-line diffs</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">e</span> <b>:</b></td><td>expand all comments</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">c</span> <b>:</b></td><td>collapse all comments</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">s</span> <b>:</b></td><td>toggle showing all comments</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">n</span> / <span class="letter">p</span> <b>:</b></td><td>next / previous diff chunk or comment</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">N</span> / <span class="letter">P</span> <b>:</b></td><td>next / previous comment</td>
</tr>
<tr>
<td class="shortcut"><span class="letter"><Enter></span> <b>:</b></td><td>respond to / edit current comment</td>
</tr>
</tbody></table>
</td>
<td>
<table width="100%">
<tbody><tr>
<td></td><th>Issue</th>
</tr>
<tr>
<td class="shortcut"><span class="letter">u</span> <b>:</b></td><td>up to list of issues</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">m</span> <b>:</b></td><td>publish + mail comments</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">j</span> / <span class="letter">k</span> <b>:</b></td><td>jump to patch after / before current patch</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">o</span> / <span class="letter"><Enter></span> <b>:</b></td><td>open current patch in side-by-side view</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">i</span> <b>:</b></td><td>open current patch in unified diff view</td>
</tr>
<tr><td> </td></tr>
<tr><td></td><th>Issue List</th></tr>
<tr>
<td class="shortcut"><span class="letter">j</span> / <span class="letter">k</span> <b>:</b></td><td>jump to issue after / before current issue</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">o</span> / <span class="letter"><Enter></span> <b>:</b></td><td>open current issue</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">#</span> <b>:</b></td>
<td>close issue</td>
</tr>
<tr><td> </td></tr>
<tr>
<td></td><th>Comment/message editing</th>
</tr>
<tr>
<td class="shortcut"><span class="letter"><Ctrl></span> + <span class="letter">s</span> <b>:</b></td><td>save comment</td>
</tr>
<tr>
<td class="shortcut"><span class="letter"><Esc></span> <b>:</b></td><td>cancel edit</td>
</tr>
</tbody></table>
</td>
</tr>
</tbody></table>
</div>
<!-- End help window -->
<div align="right">
<div style="float:left; font-weight:bold"><i>Rietveld</i> Code Review Tool</div>
<b>tomhudson@google.com (TomH)</b>
|
<a class="novisit" href="/settings">Settings</a>
|
<a class="novisit" target="_blank" href="http://code.google.com/p/rietveld/wiki/CodeReviewHelp">Help</a>
|
<a class="novisit" target="_blank" href="http://code.google.com/p/rietveld/issues/list">Bug tracker</a>
|
<a class="novisit" target="_blank" href="http://groups.google.com/group/codereview-discuss">Discussion group</a>
|
<a class="novisit" target="_blank" href="http://code.google.com/p/rietveld">Source code</a>
|
<a class="novisit" href="http://codereview.appspot.com/_ah/logout?continue=https://www.google.com/accounts/Logout%3Fcontinue%3Dhttps://appengine.google.com/_ah/logout%253Fcontinue%253Dhttp://codereview.appspot.com/4571045/%26service%3Dah">Sign out</a>
</div>
<div class="counter">(691)</div>
<div class="mainmenu">
<a href="/" class="active">Issues</a>
<a href="/repos">Repositories</a>
<a href="/search">Search</a>
</div>
<div class="mainmenu2">
<a href="/use_uploadpy">Create Issue</a>
|
<a href="/mine">My Issues</a>
|
<a href="/starred">Starred</a>
|
<a href="/all">Open</a>
|
<a href="/all?closed=1">All</a>
</div>
<div>
<h2>
<span id="issue-star-4571045">
<a href="javascript:M_addIssueStar(4571045)">
<img src="/static/star-dark.gif" width="15" height="15" border="0"></a>
</span>
<span class="issue-close" id="issue-close-4571045">
<a href="javascript:M_closeIssue(4571045)">
<img src="/static/close.gif" title="Close This Issue" width="15" height="15" border="0"></a>
</span>
Issue <a href="/4571045/" onmouseover="M_showPopUp(this, 'popup-issue');">
4571045</a>:
New matrix benchmarks to evaluate ::setConcat implementation options
</h2>
<table class="issue-details" border="0" width="100%">
<tbody><tr valign="top">
<td class="meta" width="20%">
<div>
<a class="novisit" href="/4571045/edit">
Edit Issue
</a>
<br>
<a class="novisit" href="/4571045/publish">
Publish+Mail Comments
</a> ('m')
<br>
<a class="novisit" href="/4571045/diff/1/bench/MatrixBench.cpp">
<b>Start Review</b>
</a>
</div>
<div class="issue_details_sidebar">
<div><b>Created:</b><br>
16 minutes ago by me
</div>
<div><b>Modified:</b><br>
0 minutes ago
</div>
<div><b>Reviewers:</b><br>
<a href="/user/reed1" onmouseover="M_showUserInfoPopup(this)">reed1</a>
</div>
<div><b>CC:</b><br>
</div>
<div><b>Base URL:</b><br>
http://skia.googlecode.com/svn/trunk/
</div>
<div><b>Visibility:</b><br>
Public.
</div>
</div>
</td>
<td style="padding-left: .8em; padding-right: .8em;" width="80%">
<h3><a id="issue-description-pointer" href="javascript:M_toggleSection('issue-description')" class="toggled-section opentriangle">
Description</a></h3>
<div id="issue-description" style="margin-left:15px;">
<pre>On platforms that use Float (instead of Fixed), SkMatrix stores its internal
values as floats, but setConcat() needs extra precision and so uses doubles to
contain intermediate values.
These three benchmarks compare the speed of float-only, double-only, and
float-cast-to-double implementations of a chunk of code extracted from the
non-perspective case of setConcat().
</pre>
</div>
<h3>
<a id="ps-1-pointer" href="javascript:M_toggleSectionForPS('4571045', '1')" class="toggled-section opentriangle">
Patch Set 1
</a>
</h3>
<div id="ps-1" style="">
<div class="issue-list">
<div class="pagination">
<div style="float: left;">
<i>Created:</i> 16 minutes ago
</div>
<div style="float: right;">
<a href="/download/issue4571045_1.diff">
Download raw patch set</a>
</div>
<div style="clear:both;"></div>
</div>
<table id="queues" style="clear:both;">
<tbody><tr align="left">
<th colspan="2"></th>
<th>Unified diffs</th>
<th>Side-by-side diffs</th>
<th>Delta from patch set</th>
<th colspan="3">Stats</th>
<th>Patch</th>
</tr>
<tr name="patch">
<td class="first" width="14"><img src="/static/closedtriangle.gif" style="" width="12" height="9"></td>
<td style="white-space: nowrap">M </td>
<td>
<a class="noul" href="/4571045/patch/1/2">
bench/MatrixBench.cpp
</a>
</td>
<td>
<a class="noul" href="/4571045/diff/1/bench/MatrixBench.cpp">
View
</a>
</td>
<td style="white-space: nowrap">
</td>
<td style="white-space: nowrap">4 chunks</td>
<td style="white-space: nowrap">+114 lines, -3 lines</td>
<td style="white-space: nowrap">
0 comments
</td>
<td>
<a href="/download/issue4571045_1_2.diff" title="Download patch for bench/MatrixBench.cpp">
Download
</a>
</td>
</tr>
</tbody></table>
</div>
</div>
<h3>
<a id="messages-pointer" href="javascript:M_toggleSection('messages')" class="toggled-section opentriangle">
Messages
</a>
</h3>
<div><i>Total messages: 3</i></div>
<div id="messages">
<div style="margin-bottom: .5em;">
<a href="javascript:M_showAllComments('cl', 3)">
Expand All Messages</a>
|
<a href="javascript:M_hideAllComments('cl', 3)">
Collapse All Messages</a>
</div>
<div class="message " id="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UY6QcM" name="0">
<a name="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UY6QcM"></a>
<div class="header">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tbody><tr class="comment_title" onclick="M_switchChangelistComment(0)">
<td style="padding-left: 5px; white-space: nowrap;">
<b>me</b>
</td>
<td width="100%">
<table style="table-layout:fixed; white-space: nowrap;" width="100%">
<tbody><tr>
<td>
<div style="white-space: nowrap; overflow: hidden;" class="extra" id="cl-preview-0">
</div>
</td>
</tr>
</tbody></table>
</td>
<td align="right" style="white-space: nowrap; padding-right: 5px;">
13 minutes ago
</td>
</tr>
</tbody></table>
</div>
<div id="cl-comment-0" style="display: none;">
<div class="message-body">
<pre name="cl-message-0"></pre>
</div>
<div class="message-actions">
<a href="javascript:M_replyToMessage('0', '2011/06/03 18:57:35', 'TomH')" id="message-reply-href-0">Reply</a>
<textarea rows="7" cols="70" name="message" style="display:none"></textarea>
<div id="message-reply-0" style="display:none;"></div>
</div>
</div>
</div>
<div class="message " id="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UY0Q8M" name="1">
<a name="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UY0Q8M"></a>
<div class="header">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tbody><tr class="comment_title" onclick="M_switchChangelistComment(1)">
<td style="padding-left: 5px; white-space: nowrap;">
<b>reed1</b>
</td>
<td width="100%">
<table style="table-layout:fixed; white-space: nowrap;" width="100%">
<tbody><tr>
<td>
<div style="white-space: nowrap; overflow: hidden;" class="extra" id="cl-preview-1">
1. lets remove the "fix" from the function name. just muladdmul I think 2. we ...
</div>
</td>
</tr>
</tbody></table>
</td>
<td align="right" style="white-space: nowrap; padding-right: 5px;">
10 minutes ago
</td>
</tr>
</tbody></table>
</div>
<div id="cl-comment-1" style="display: none;">
<div class="message-body">
<pre name="cl-message-1">1. lets remove the "fix" from the function name. just muladdmul I think
2. we can remove the return, since it will be compiled away anyway
3. nice checkin comment!
4. what are the results like?</pre>
</div>
<div class="message-actions">
<a href="javascript:M_replyToMessage('1', '2011/06/03 19:00:39', 'reed1')" id="message-reply-href-1">Reply</a>
<textarea rows="7" cols="70" name="message" style="display:none"></textarea>
<div id="message-reply-1" style="display:none;"></div>
</div>
</div>
</div>
<div class="message " id="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UYuRcM" name="2">
<a name="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UYuRcM"></a>
<div class="header">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tbody><tr class="comment_title" onclick="M_switchChangelistComment(2)">
<td style="padding-left: 5px; white-space: nowrap;">
<b>me</b>
</td>
<td width="100%">
<table style="table-layout:fixed; white-space: nowrap;" width="100%">
<tbody><tr>
<td>
<div style="white-space: nowrap; overflow: hidden; visibility: hidden;" class="extra" id="cl-preview-2">
> 4. what are the results like? For posterity: tomhudson@tomhudson-zx600-linux:/usr/local/google/src/skia3$ out/bench/bench -match matrix_concat -repeat 1000 ...
</div>
</td>
</tr>
</tbody></table>
</td>
<td align="right" style="white-space: nowrap; padding-right: 5px;">
0 minutes ago
</td>
</tr>
</tbody></table>
</div>
<div id="cl-comment-2">
<div class="message-body">
<pre name="cl-message-2">> 4. what are the results like?
For posterity:
tomhudson@tomhudson-zx600-linux:/usr/local/google/src/skia3$ out/bench/bench
-match matrix_concat -repeat 1000
skia bench: alpha=0xFF antialias=1 filter=0
running bench [640 480] matrix_concat_double 8888: msecs = 0.79 565:
msecs = 0.79 GPU: msecs = 0.79
running bench [640 480] matrix_concat_floatdouble 8888: msecs = 0.97 565:
msecs = 0.97 GPU: msecs = 0.97
running bench [640 480] matrix_concat_float 8888: msecs = 0.74 565:
msecs = 0.73 GPU: msecs = 0.74</pre>
</div>
<div class="message-actions">
<a href="javascript:M_replyToMessage('2', '2011/06/03 19:11:06', 'TomH')" id="message-reply-href-2">Reply</a>
<textarea rows="7" cols="70" name="message" style="display:none"></textarea>
<div id="message-reply-2" style="display:none;"></div>
</div>
</div>
</div>
<div>
<a href="javascript:M_showAllComments('cl', 3)">
Expand All Messages</a>
|
<a href="javascript:M_hideAllComments('cl', 3)">
Collapse All Messages</a>
</div>
</div>
<script language="JavaScript" type="text/javascript">
<!--
document.onkeydown = M_changelistKeyDown;
var dashboardState = new M_DashboardState(window, 'patch', 'M_CLPatchMarker');
M_switchChangelistCommentByAnchor();
// -->
</script>
<div style="display:none;">
<form method="POST" action="/4571045/publish" id="message-reply-form">
<input type="hidden" name="xsrf_token" value="dd5d1a57ca1d5440593050fdc596d377">
<div></div>
<input type="hidden" name="subject" value="New matrix benchmarks to evaluate ::setConcat implementation options">
<input type="hidden" name="message_only" value="1">
<input type="submit" value="Send Message">
<input type="button" value="Discard" name="discard">
<input type="checkbox" name="send_mail" value="1" id="message-reply-send-mail" checked="checked">
<label>Send mail to reviewers</label>
</form>
</div>
<a id="resizer" class="resizer" style="display:none;cursor:pointer">
<img src="/static/zippyplus.gif">
</a>
</td>
</tr>
</tbody></table>
</div>
<div class="popup" id="popup-issue" style="left: 104px; top: 116px; visibility: hidden; ">
<b>Issue 4571045: New matrix benchmarks to evaluate ::setConcat implementation options
</b><br>
Created 16 minutes ago by me<br>
Modified 0 minutes ago<br>
Reviewers: reed1<br>
Base URL: http://skia.googlecode.com/svn/trunk/<br>
Comments: 0
</div>
<p></p>
<div style="float: left;">
<a target="_blank" href="http://code.google.com/appengine/"><img border="0" src="/static/appengine-noborder-120x30.gif" alt="Powered by Google App Engine"></a>
</div>
<div class="extra" style="font-size: 9pt; float: right; text-align: right;">
<div style="height:14px;">
<img src="/static/rss.gif" alt="RSS Feeds" width="14" height="14" align="top">
<a href="/rss/all">Recent Issues</a>
|
<a href="/rss/mine/TomH">My Issues</a>
|
<a href="/rss/reviews/TomH">My Reviews</a>
|
<a href="/rss/closed/TomH">My Closed</a>
|
<a href="/rss/issue/4571045">This issue</a>
</div>
<div style="margin-top: .3em;">This is Rietveld <a href="http://code.google.com/p/rietveld/updates/list">r756
</a></div>
</div>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script><script src="http://www.google-analytics.com/ga.js" type="text/javascript"></script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-4803694-4");
pageTracker._initData();
pageTracker._trackPageview();
</script>
On platforms that use Float (instead of Fixed), SkMatrix stores its internal
values as floats, but setConcat() needs extra precision and so uses doubles
to contain intermediate values.
These three benchmarks compare the speed of float-only, double-only, and
float-cast-to-double implementations of a chunk of code extracted from the
non-perspective case of setConcat().
git-svn-id: http://skia.googlecode.com/svn/trunk@1497 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-06-03 19:16:56 +00:00
|
|
|
typedef MatrixBench INHERITED;
|
|
|
|
};
|
|
|
|
|
|
|
|
static inline float SkDoubleToFloat(double x) {
|
|
|
|
return static_cast<float>(x);
|
|
|
|
}
|
|
|
|
|
|
|
|
// Test the performance of setConcat() non-perspective case:
|
|
|
|
// using floating point precision but casting up to float for
|
|
|
|
// intermediate results during computations.
|
|
|
|
class FloatDoubleConcatMatrixBench : public MatrixBench {
|
|
|
|
public:
|
2011-06-06 13:20:29 +00:00
|
|
|
FloatDoubleConcatMatrixBench(void* p) : INHERITED(p, "concat_floatdouble") {
|
|
|
|
init9(mya);
|
|
|
|
init9(myb);
|
|
|
|
init9(myr);
|
<body onunload="M_unloadPage();">
<!-- Begin help window -->
<script type="text/javascript"><!--
var xsrfToken = 'dd5d1a57ca1d5440593050fdc596d377';
var helpDisplayed = false;
document.onclick = M_clickCommon;
var media_url = "/static/";
var base_url = "/";
var publish_link = "/4571045/publish";
// -->
</script>
<div id="help" style="display: none;">
<div style="font-size: medium; text-align: center;">Keyboard Shortcuts</div>
<hr>
<table width="100%">
<tbody><tr valign="top">
<td>
<table width="100%">
<tbody><tr>
<td></td><th>File</th>
</tr>
<tr>
<td class="shortcut"><span class="letter">u</span> <b>:</b></td><td>up to issue</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">m</span> <b>:</b></td><td>publish + mail comments</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">M</span> <b>:</b></td><td>edit review message</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">j</span> / <span class="letter">k</span> <b>:</b></td><td>jump to file after / before current file</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">J</span> / <span class="letter">K</span> <b>:</b></td><td>jump to next file with a comment after / before current file</td>
</tr>
<tr>
<td></td><th>Side-by-side diff</th>
</tr>
<tr>
<td class="shortcut"><span class="letter">i</span> <b>:</b></td><td>toggle intra-line diffs</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">e</span> <b>:</b></td><td>expand all comments</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">c</span> <b>:</b></td><td>collapse all comments</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">s</span> <b>:</b></td><td>toggle showing all comments</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">n</span> / <span class="letter">p</span> <b>:</b></td><td>next / previous diff chunk or comment</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">N</span> / <span class="letter">P</span> <b>:</b></td><td>next / previous comment</td>
</tr>
<tr>
<td class="shortcut"><span class="letter"><Enter></span> <b>:</b></td><td>respond to / edit current comment</td>
</tr>
</tbody></table>
</td>
<td>
<table width="100%">
<tbody><tr>
<td></td><th>Issue</th>
</tr>
<tr>
<td class="shortcut"><span class="letter">u</span> <b>:</b></td><td>up to list of issues</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">m</span> <b>:</b></td><td>publish + mail comments</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">j</span> / <span class="letter">k</span> <b>:</b></td><td>jump to patch after / before current patch</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">o</span> / <span class="letter"><Enter></span> <b>:</b></td><td>open current patch in side-by-side view</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">i</span> <b>:</b></td><td>open current patch in unified diff view</td>
</tr>
<tr><td> </td></tr>
<tr><td></td><th>Issue List</th></tr>
<tr>
<td class="shortcut"><span class="letter">j</span> / <span class="letter">k</span> <b>:</b></td><td>jump to issue after / before current issue</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">o</span> / <span class="letter"><Enter></span> <b>:</b></td><td>open current issue</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">#</span> <b>:</b></td>
<td>close issue</td>
</tr>
<tr><td> </td></tr>
<tr>
<td></td><th>Comment/message editing</th>
</tr>
<tr>
<td class="shortcut"><span class="letter"><Ctrl></span> + <span class="letter">s</span> <b>:</b></td><td>save comment</td>
</tr>
<tr>
<td class="shortcut"><span class="letter"><Esc></span> <b>:</b></td><td>cancel edit</td>
</tr>
</tbody></table>
</td>
</tr>
</tbody></table>
</div>
<!-- End help window -->
<div align="right">
<div style="float:left; font-weight:bold"><i>Rietveld</i> Code Review Tool</div>
<b>tomhudson@google.com (TomH)</b>
|
<a class="novisit" href="/settings">Settings</a>
|
<a class="novisit" target="_blank" href="http://code.google.com/p/rietveld/wiki/CodeReviewHelp">Help</a>
|
<a class="novisit" target="_blank" href="http://code.google.com/p/rietveld/issues/list">Bug tracker</a>
|
<a class="novisit" target="_blank" href="http://groups.google.com/group/codereview-discuss">Discussion group</a>
|
<a class="novisit" target="_blank" href="http://code.google.com/p/rietveld">Source code</a>
|
<a class="novisit" href="http://codereview.appspot.com/_ah/logout?continue=https://www.google.com/accounts/Logout%3Fcontinue%3Dhttps://appengine.google.com/_ah/logout%253Fcontinue%253Dhttp://codereview.appspot.com/4571045/%26service%3Dah">Sign out</a>
</div>
<div class="counter">(691)</div>
<div class="mainmenu">
<a href="/" class="active">Issues</a>
<a href="/repos">Repositories</a>
<a href="/search">Search</a>
</div>
<div class="mainmenu2">
<a href="/use_uploadpy">Create Issue</a>
|
<a href="/mine">My Issues</a>
|
<a href="/starred">Starred</a>
|
<a href="/all">Open</a>
|
<a href="/all?closed=1">All</a>
</div>
<div>
<h2>
<span id="issue-star-4571045">
<a href="javascript:M_addIssueStar(4571045)">
<img src="/static/star-dark.gif" width="15" height="15" border="0"></a>
</span>
<span class="issue-close" id="issue-close-4571045">
<a href="javascript:M_closeIssue(4571045)">
<img src="/static/close.gif" title="Close This Issue" width="15" height="15" border="0"></a>
</span>
Issue <a href="/4571045/" onmouseover="M_showPopUp(this, 'popup-issue');">
4571045</a>:
New matrix benchmarks to evaluate ::setConcat implementation options
</h2>
<table class="issue-details" border="0" width="100%">
<tbody><tr valign="top">
<td class="meta" width="20%">
<div>
<a class="novisit" href="/4571045/edit">
Edit Issue
</a>
<br>
<a class="novisit" href="/4571045/publish">
Publish+Mail Comments
</a> ('m')
<br>
<a class="novisit" href="/4571045/diff/1/bench/MatrixBench.cpp">
<b>Start Review</b>
</a>
</div>
<div class="issue_details_sidebar">
<div><b>Created:</b><br>
16 minutes ago by me
</div>
<div><b>Modified:</b><br>
0 minutes ago
</div>
<div><b>Reviewers:</b><br>
<a href="/user/reed1" onmouseover="M_showUserInfoPopup(this)">reed1</a>
</div>
<div><b>CC:</b><br>
</div>
<div><b>Base URL:</b><br>
http://skia.googlecode.com/svn/trunk/
</div>
<div><b>Visibility:</b><br>
Public.
</div>
</div>
</td>
<td style="padding-left: .8em; padding-right: .8em;" width="80%">
<h3><a id="issue-description-pointer" href="javascript:M_toggleSection('issue-description')" class="toggled-section opentriangle">
Description</a></h3>
<div id="issue-description" style="margin-left:15px;">
<pre>On platforms that use Float (instead of Fixed), SkMatrix stores its internal
values as floats, but setConcat() needs extra precision and so uses doubles to
contain intermediate values.
These three benchmarks compare the speed of float-only, double-only, and
float-cast-to-double implementations of a chunk of code extracted from the
non-perspective case of setConcat().
</pre>
</div>
<h3>
<a id="ps-1-pointer" href="javascript:M_toggleSectionForPS('4571045', '1')" class="toggled-section opentriangle">
Patch Set 1
</a>
</h3>
<div id="ps-1" style="">
<div class="issue-list">
<div class="pagination">
<div style="float: left;">
<i>Created:</i> 16 minutes ago
</div>
<div style="float: right;">
<a href="/download/issue4571045_1.diff">
Download raw patch set</a>
</div>
<div style="clear:both;"></div>
</div>
<table id="queues" style="clear:both;">
<tbody><tr align="left">
<th colspan="2"></th>
<th>Unified diffs</th>
<th>Side-by-side diffs</th>
<th>Delta from patch set</th>
<th colspan="3">Stats</th>
<th>Patch</th>
</tr>
<tr name="patch">
<td class="first" width="14"><img src="/static/closedtriangle.gif" style="" width="12" height="9"></td>
<td style="white-space: nowrap">M </td>
<td>
<a class="noul" href="/4571045/patch/1/2">
bench/MatrixBench.cpp
</a>
</td>
<td>
<a class="noul" href="/4571045/diff/1/bench/MatrixBench.cpp">
View
</a>
</td>
<td style="white-space: nowrap">
</td>
<td style="white-space: nowrap">4 chunks</td>
<td style="white-space: nowrap">+114 lines, -3 lines</td>
<td style="white-space: nowrap">
0 comments
</td>
<td>
<a href="/download/issue4571045_1_2.diff" title="Download patch for bench/MatrixBench.cpp">
Download
</a>
</td>
</tr>
</tbody></table>
</div>
</div>
<h3>
<a id="messages-pointer" href="javascript:M_toggleSection('messages')" class="toggled-section opentriangle">
Messages
</a>
</h3>
<div><i>Total messages: 3</i></div>
<div id="messages">
<div style="margin-bottom: .5em;">
<a href="javascript:M_showAllComments('cl', 3)">
Expand All Messages</a>
|
<a href="javascript:M_hideAllComments('cl', 3)">
Collapse All Messages</a>
</div>
<div class="message " id="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UY6QcM" name="0">
<a name="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UY6QcM"></a>
<div class="header">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tbody><tr class="comment_title" onclick="M_switchChangelistComment(0)">
<td style="padding-left: 5px; white-space: nowrap;">
<b>me</b>
</td>
<td width="100%">
<table style="table-layout:fixed; white-space: nowrap;" width="100%">
<tbody><tr>
<td>
<div style="white-space: nowrap; overflow: hidden;" class="extra" id="cl-preview-0">
</div>
</td>
</tr>
</tbody></table>
</td>
<td align="right" style="white-space: nowrap; padding-right: 5px;">
13 minutes ago
</td>
</tr>
</tbody></table>
</div>
<div id="cl-comment-0" style="display: none;">
<div class="message-body">
<pre name="cl-message-0"></pre>
</div>
<div class="message-actions">
<a href="javascript:M_replyToMessage('0', '2011/06/03 18:57:35', 'TomH')" id="message-reply-href-0">Reply</a>
<textarea rows="7" cols="70" name="message" style="display:none"></textarea>
<div id="message-reply-0" style="display:none;"></div>
</div>
</div>
</div>
<div class="message " id="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UY0Q8M" name="1">
<a name="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UY0Q8M"></a>
<div class="header">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tbody><tr class="comment_title" onclick="M_switchChangelistComment(1)">
<td style="padding-left: 5px; white-space: nowrap;">
<b>reed1</b>
</td>
<td width="100%">
<table style="table-layout:fixed; white-space: nowrap;" width="100%">
<tbody><tr>
<td>
<div style="white-space: nowrap; overflow: hidden;" class="extra" id="cl-preview-1">
1. lets remove the "fix" from the function name. just muladdmul I think 2. we ...
</div>
</td>
</tr>
</tbody></table>
</td>
<td align="right" style="white-space: nowrap; padding-right: 5px;">
10 minutes ago
</td>
</tr>
</tbody></table>
</div>
<div id="cl-comment-1" style="display: none;">
<div class="message-body">
<pre name="cl-message-1">1. lets remove the "fix" from the function name. just muladdmul I think
2. we can remove the return, since it will be compiled away anyway
3. nice checkin comment!
4. what are the results like?</pre>
</div>
<div class="message-actions">
<a href="javascript:M_replyToMessage('1', '2011/06/03 19:00:39', 'reed1')" id="message-reply-href-1">Reply</a>
<textarea rows="7" cols="70" name="message" style="display:none"></textarea>
<div id="message-reply-1" style="display:none;"></div>
</div>
</div>
</div>
<div class="message " id="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UYuRcM" name="2">
<a name="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UYuRcM"></a>
<div class="header">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tbody><tr class="comment_title" onclick="M_switchChangelistComment(2)">
<td style="padding-left: 5px; white-space: nowrap;">
<b>me</b>
</td>
<td width="100%">
<table style="table-layout:fixed; white-space: nowrap;" width="100%">
<tbody><tr>
<td>
<div style="white-space: nowrap; overflow: hidden; visibility: hidden;" class="extra" id="cl-preview-2">
> 4. what are the results like? For posterity: tomhudson@tomhudson-zx600-linux:/usr/local/google/src/skia3$ out/bench/bench -match matrix_concat -repeat 1000 ...
</div>
</td>
</tr>
</tbody></table>
</td>
<td align="right" style="white-space: nowrap; padding-right: 5px;">
0 minutes ago
</td>
</tr>
</tbody></table>
</div>
<div id="cl-comment-2">
<div class="message-body">
<pre name="cl-message-2">> 4. what are the results like?
For posterity:
tomhudson@tomhudson-zx600-linux:/usr/local/google/src/skia3$ out/bench/bench
-match matrix_concat -repeat 1000
skia bench: alpha=0xFF antialias=1 filter=0
running bench [640 480] matrix_concat_double 8888: msecs = 0.79 565:
msecs = 0.79 GPU: msecs = 0.79
running bench [640 480] matrix_concat_floatdouble 8888: msecs = 0.97 565:
msecs = 0.97 GPU: msecs = 0.97
running bench [640 480] matrix_concat_float 8888: msecs = 0.74 565:
msecs = 0.73 GPU: msecs = 0.74</pre>
</div>
<div class="message-actions">
<a href="javascript:M_replyToMessage('2', '2011/06/03 19:11:06', 'TomH')" id="message-reply-href-2">Reply</a>
<textarea rows="7" cols="70" name="message" style="display:none"></textarea>
<div id="message-reply-2" style="display:none;"></div>
</div>
</div>
</div>
<div>
<a href="javascript:M_showAllComments('cl', 3)">
Expand All Messages</a>
|
<a href="javascript:M_hideAllComments('cl', 3)">
Collapse All Messages</a>
</div>
</div>
<script language="JavaScript" type="text/javascript">
<!--
document.onkeydown = M_changelistKeyDown;
var dashboardState = new M_DashboardState(window, 'patch', 'M_CLPatchMarker');
M_switchChangelistCommentByAnchor();
// -->
</script>
<div style="display:none;">
<form method="POST" action="/4571045/publish" id="message-reply-form">
<input type="hidden" name="xsrf_token" value="dd5d1a57ca1d5440593050fdc596d377">
<div></div>
<input type="hidden" name="subject" value="New matrix benchmarks to evaluate ::setConcat implementation options">
<input type="hidden" name="message_only" value="1">
<input type="submit" value="Send Message">
<input type="button" value="Discard" name="discard">
<input type="checkbox" name="send_mail" value="1" id="message-reply-send-mail" checked="checked">
<label>Send mail to reviewers</label>
</form>
</div>
<a id="resizer" class="resizer" style="display:none;cursor:pointer">
<img src="/static/zippyplus.gif">
</a>
</td>
</tr>
</tbody></table>
</div>
<div class="popup" id="popup-issue" style="left: 104px; top: 116px; visibility: hidden; ">
<b>Issue 4571045: New matrix benchmarks to evaluate ::setConcat implementation options
</b><br>
Created 16 minutes ago by me<br>
Modified 0 minutes ago<br>
Reviewers: reed1<br>
Base URL: http://skia.googlecode.com/svn/trunk/<br>
Comments: 0
</div>
<p></p>
<div style="float: left;">
<a target="_blank" href="http://code.google.com/appengine/"><img border="0" src="/static/appengine-noborder-120x30.gif" alt="Powered by Google App Engine"></a>
</div>
<div class="extra" style="font-size: 9pt; float: right; text-align: right;">
<div style="height:14px;">
<img src="/static/rss.gif" alt="RSS Feeds" width="14" height="14" align="top">
<a href="/rss/all">Recent Issues</a>
|
<a href="/rss/mine/TomH">My Issues</a>
|
<a href="/rss/reviews/TomH">My Reviews</a>
|
<a href="/rss/closed/TomH">My Closed</a>
|
<a href="/rss/issue/4571045">This issue</a>
</div>
<div style="margin-top: .3em;">This is Rietveld <a href="http://code.google.com/p/rietveld/updates/list">r756
</a></div>
</div>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script><script src="http://www.google-analytics.com/ga.js" type="text/javascript"></script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-4803694-4");
pageTracker._initData();
pageTracker._trackPageview();
</script>
On platforms that use Float (instead of Fixed), SkMatrix stores its internal
values as floats, but setConcat() needs extra precision and so uses doubles
to contain intermediate values.
These three benchmarks compare the speed of float-only, double-only, and
float-cast-to-double implementations of a chunk of code extracted from the
non-perspective case of setConcat().
git-svn-id: http://skia.googlecode.com/svn/trunk@1497 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-06-03 19:16:56 +00:00
|
|
|
}
|
|
|
|
protected:
|
2011-06-06 13:31:30 +00:00
|
|
|
virtual int mulLoopCount() const { return 4; }
|
|
|
|
|
<body onunload="M_unloadPage();">
<!-- Begin help window -->
<script type="text/javascript"><!--
var xsrfToken = 'dd5d1a57ca1d5440593050fdc596d377';
var helpDisplayed = false;
document.onclick = M_clickCommon;
var media_url = "/static/";
var base_url = "/";
var publish_link = "/4571045/publish";
// -->
</script>
<div id="help" style="display: none;">
<div style="font-size: medium; text-align: center;">Keyboard Shortcuts</div>
<hr>
<table width="100%">
<tbody><tr valign="top">
<td>
<table width="100%">
<tbody><tr>
<td></td><th>File</th>
</tr>
<tr>
<td class="shortcut"><span class="letter">u</span> <b>:</b></td><td>up to issue</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">m</span> <b>:</b></td><td>publish + mail comments</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">M</span> <b>:</b></td><td>edit review message</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">j</span> / <span class="letter">k</span> <b>:</b></td><td>jump to file after / before current file</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">J</span> / <span class="letter">K</span> <b>:</b></td><td>jump to next file with a comment after / before current file</td>
</tr>
<tr>
<td></td><th>Side-by-side diff</th>
</tr>
<tr>
<td class="shortcut"><span class="letter">i</span> <b>:</b></td><td>toggle intra-line diffs</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">e</span> <b>:</b></td><td>expand all comments</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">c</span> <b>:</b></td><td>collapse all comments</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">s</span> <b>:</b></td><td>toggle showing all comments</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">n</span> / <span class="letter">p</span> <b>:</b></td><td>next / previous diff chunk or comment</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">N</span> / <span class="letter">P</span> <b>:</b></td><td>next / previous comment</td>
</tr>
<tr>
<td class="shortcut"><span class="letter"><Enter></span> <b>:</b></td><td>respond to / edit current comment</td>
</tr>
</tbody></table>
</td>
<td>
<table width="100%">
<tbody><tr>
<td></td><th>Issue</th>
</tr>
<tr>
<td class="shortcut"><span class="letter">u</span> <b>:</b></td><td>up to list of issues</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">m</span> <b>:</b></td><td>publish + mail comments</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">j</span> / <span class="letter">k</span> <b>:</b></td><td>jump to patch after / before current patch</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">o</span> / <span class="letter"><Enter></span> <b>:</b></td><td>open current patch in side-by-side view</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">i</span> <b>:</b></td><td>open current patch in unified diff view</td>
</tr>
<tr><td> </td></tr>
<tr><td></td><th>Issue List</th></tr>
<tr>
<td class="shortcut"><span class="letter">j</span> / <span class="letter">k</span> <b>:</b></td><td>jump to issue after / before current issue</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">o</span> / <span class="letter"><Enter></span> <b>:</b></td><td>open current issue</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">#</span> <b>:</b></td>
<td>close issue</td>
</tr>
<tr><td> </td></tr>
<tr>
<td></td><th>Comment/message editing</th>
</tr>
<tr>
<td class="shortcut"><span class="letter"><Ctrl></span> + <span class="letter">s</span> <b>:</b></td><td>save comment</td>
</tr>
<tr>
<td class="shortcut"><span class="letter"><Esc></span> <b>:</b></td><td>cancel edit</td>
</tr>
</tbody></table>
</td>
</tr>
</tbody></table>
</div>
<!-- End help window -->
<div align="right">
<div style="float:left; font-weight:bold"><i>Rietveld</i> Code Review Tool</div>
<b>tomhudson@google.com (TomH)</b>
|
<a class="novisit" href="/settings">Settings</a>
|
<a class="novisit" target="_blank" href="http://code.google.com/p/rietveld/wiki/CodeReviewHelp">Help</a>
|
<a class="novisit" target="_blank" href="http://code.google.com/p/rietveld/issues/list">Bug tracker</a>
|
<a class="novisit" target="_blank" href="http://groups.google.com/group/codereview-discuss">Discussion group</a>
|
<a class="novisit" target="_blank" href="http://code.google.com/p/rietveld">Source code</a>
|
<a class="novisit" href="http://codereview.appspot.com/_ah/logout?continue=https://www.google.com/accounts/Logout%3Fcontinue%3Dhttps://appengine.google.com/_ah/logout%253Fcontinue%253Dhttp://codereview.appspot.com/4571045/%26service%3Dah">Sign out</a>
</div>
<div class="counter">(691)</div>
<div class="mainmenu">
<a href="/" class="active">Issues</a>
<a href="/repos">Repositories</a>
<a href="/search">Search</a>
</div>
<div class="mainmenu2">
<a href="/use_uploadpy">Create Issue</a>
|
<a href="/mine">My Issues</a>
|
<a href="/starred">Starred</a>
|
<a href="/all">Open</a>
|
<a href="/all?closed=1">All</a>
</div>
<div>
<h2>
<span id="issue-star-4571045">
<a href="javascript:M_addIssueStar(4571045)">
<img src="/static/star-dark.gif" width="15" height="15" border="0"></a>
</span>
<span class="issue-close" id="issue-close-4571045">
<a href="javascript:M_closeIssue(4571045)">
<img src="/static/close.gif" title="Close This Issue" width="15" height="15" border="0"></a>
</span>
Issue <a href="/4571045/" onmouseover="M_showPopUp(this, 'popup-issue');">
4571045</a>:
New matrix benchmarks to evaluate ::setConcat implementation options
</h2>
<table class="issue-details" border="0" width="100%">
<tbody><tr valign="top">
<td class="meta" width="20%">
<div>
<a class="novisit" href="/4571045/edit">
Edit Issue
</a>
<br>
<a class="novisit" href="/4571045/publish">
Publish+Mail Comments
</a> ('m')
<br>
<a class="novisit" href="/4571045/diff/1/bench/MatrixBench.cpp">
<b>Start Review</b>
</a>
</div>
<div class="issue_details_sidebar">
<div><b>Created:</b><br>
16 minutes ago by me
</div>
<div><b>Modified:</b><br>
0 minutes ago
</div>
<div><b>Reviewers:</b><br>
<a href="/user/reed1" onmouseover="M_showUserInfoPopup(this)">reed1</a>
</div>
<div><b>CC:</b><br>
</div>
<div><b>Base URL:</b><br>
http://skia.googlecode.com/svn/trunk/
</div>
<div><b>Visibility:</b><br>
Public.
</div>
</div>
</td>
<td style="padding-left: .8em; padding-right: .8em;" width="80%">
<h3><a id="issue-description-pointer" href="javascript:M_toggleSection('issue-description')" class="toggled-section opentriangle">
Description</a></h3>
<div id="issue-description" style="margin-left:15px;">
<pre>On platforms that use Float (instead of Fixed), SkMatrix stores its internal
values as floats, but setConcat() needs extra precision and so uses doubles to
contain intermediate values.
These three benchmarks compare the speed of float-only, double-only, and
float-cast-to-double implementations of a chunk of code extracted from the
non-perspective case of setConcat().
</pre>
</div>
<h3>
<a id="ps-1-pointer" href="javascript:M_toggleSectionForPS('4571045', '1')" class="toggled-section opentriangle">
Patch Set 1
</a>
</h3>
<div id="ps-1" style="">
<div class="issue-list">
<div class="pagination">
<div style="float: left;">
<i>Created:</i> 16 minutes ago
</div>
<div style="float: right;">
<a href="/download/issue4571045_1.diff">
Download raw patch set</a>
</div>
<div style="clear:both;"></div>
</div>
<table id="queues" style="clear:both;">
<tbody><tr align="left">
<th colspan="2"></th>
<th>Unified diffs</th>
<th>Side-by-side diffs</th>
<th>Delta from patch set</th>
<th colspan="3">Stats</th>
<th>Patch</th>
</tr>
<tr name="patch">
<td class="first" width="14"><img src="/static/closedtriangle.gif" style="" width="12" height="9"></td>
<td style="white-space: nowrap">M </td>
<td>
<a class="noul" href="/4571045/patch/1/2">
bench/MatrixBench.cpp
</a>
</td>
<td>
<a class="noul" href="/4571045/diff/1/bench/MatrixBench.cpp">
View
</a>
</td>
<td style="white-space: nowrap">
</td>
<td style="white-space: nowrap">4 chunks</td>
<td style="white-space: nowrap">+114 lines, -3 lines</td>
<td style="white-space: nowrap">
0 comments
</td>
<td>
<a href="/download/issue4571045_1_2.diff" title="Download patch for bench/MatrixBench.cpp">
Download
</a>
</td>
</tr>
</tbody></table>
</div>
</div>
<h3>
<a id="messages-pointer" href="javascript:M_toggleSection('messages')" class="toggled-section opentriangle">
Messages
</a>
</h3>
<div><i>Total messages: 3</i></div>
<div id="messages">
<div style="margin-bottom: .5em;">
<a href="javascript:M_showAllComments('cl', 3)">
Expand All Messages</a>
|
<a href="javascript:M_hideAllComments('cl', 3)">
Collapse All Messages</a>
</div>
<div class="message " id="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UY6QcM" name="0">
<a name="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UY6QcM"></a>
<div class="header">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tbody><tr class="comment_title" onclick="M_switchChangelistComment(0)">
<td style="padding-left: 5px; white-space: nowrap;">
<b>me</b>
</td>
<td width="100%">
<table style="table-layout:fixed; white-space: nowrap;" width="100%">
<tbody><tr>
<td>
<div style="white-space: nowrap; overflow: hidden;" class="extra" id="cl-preview-0">
</div>
</td>
</tr>
</tbody></table>
</td>
<td align="right" style="white-space: nowrap; padding-right: 5px;">
13 minutes ago
</td>
</tr>
</tbody></table>
</div>
<div id="cl-comment-0" style="display: none;">
<div class="message-body">
<pre name="cl-message-0"></pre>
</div>
<div class="message-actions">
<a href="javascript:M_replyToMessage('0', '2011/06/03 18:57:35', 'TomH')" id="message-reply-href-0">Reply</a>
<textarea rows="7" cols="70" name="message" style="display:none"></textarea>
<div id="message-reply-0" style="display:none;"></div>
</div>
</div>
</div>
<div class="message " id="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UY0Q8M" name="1">
<a name="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UY0Q8M"></a>
<div class="header">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tbody><tr class="comment_title" onclick="M_switchChangelistComment(1)">
<td style="padding-left: 5px; white-space: nowrap;">
<b>reed1</b>
</td>
<td width="100%">
<table style="table-layout:fixed; white-space: nowrap;" width="100%">
<tbody><tr>
<td>
<div style="white-space: nowrap; overflow: hidden;" class="extra" id="cl-preview-1">
1. lets remove the "fix" from the function name. just muladdmul I think 2. we ...
</div>
</td>
</tr>
</tbody></table>
</td>
<td align="right" style="white-space: nowrap; padding-right: 5px;">
10 minutes ago
</td>
</tr>
</tbody></table>
</div>
<div id="cl-comment-1" style="display: none;">
<div class="message-body">
<pre name="cl-message-1">1. lets remove the "fix" from the function name. just muladdmul I think
2. we can remove the return, since it will be compiled away anyway
3. nice checkin comment!
4. what are the results like?</pre>
</div>
<div class="message-actions">
<a href="javascript:M_replyToMessage('1', '2011/06/03 19:00:39', 'reed1')" id="message-reply-href-1">Reply</a>
<textarea rows="7" cols="70" name="message" style="display:none"></textarea>
<div id="message-reply-1" style="display:none;"></div>
</div>
</div>
</div>
<div class="message " id="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UYuRcM" name="2">
<a name="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UYuRcM"></a>
<div class="header">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tbody><tr class="comment_title" onclick="M_switchChangelistComment(2)">
<td style="padding-left: 5px; white-space: nowrap;">
<b>me</b>
</td>
<td width="100%">
<table style="table-layout:fixed; white-space: nowrap;" width="100%">
<tbody><tr>
<td>
<div style="white-space: nowrap; overflow: hidden; visibility: hidden;" class="extra" id="cl-preview-2">
> 4. what are the results like? For posterity: tomhudson@tomhudson-zx600-linux:/usr/local/google/src/skia3$ out/bench/bench -match matrix_concat -repeat 1000 ...
</div>
</td>
</tr>
</tbody></table>
</td>
<td align="right" style="white-space: nowrap; padding-right: 5px;">
0 minutes ago
</td>
</tr>
</tbody></table>
</div>
<div id="cl-comment-2">
<div class="message-body">
<pre name="cl-message-2">> 4. what are the results like?
For posterity:
tomhudson@tomhudson-zx600-linux:/usr/local/google/src/skia3$ out/bench/bench
-match matrix_concat -repeat 1000
skia bench: alpha=0xFF antialias=1 filter=0
running bench [640 480] matrix_concat_double 8888: msecs = 0.79 565:
msecs = 0.79 GPU: msecs = 0.79
running bench [640 480] matrix_concat_floatdouble 8888: msecs = 0.97 565:
msecs = 0.97 GPU: msecs = 0.97
running bench [640 480] matrix_concat_float 8888: msecs = 0.74 565:
msecs = 0.73 GPU: msecs = 0.74</pre>
</div>
<div class="message-actions">
<a href="javascript:M_replyToMessage('2', '2011/06/03 19:11:06', 'TomH')" id="message-reply-href-2">Reply</a>
<textarea rows="7" cols="70" name="message" style="display:none"></textarea>
<div id="message-reply-2" style="display:none;"></div>
</div>
</div>
</div>
<div>
<a href="javascript:M_showAllComments('cl', 3)">
Expand All Messages</a>
|
<a href="javascript:M_hideAllComments('cl', 3)">
Collapse All Messages</a>
</div>
</div>
<script language="JavaScript" type="text/javascript">
<!--
document.onkeydown = M_changelistKeyDown;
var dashboardState = new M_DashboardState(window, 'patch', 'M_CLPatchMarker');
M_switchChangelistCommentByAnchor();
// -->
</script>
<div style="display:none;">
<form method="POST" action="/4571045/publish" id="message-reply-form">
<input type="hidden" name="xsrf_token" value="dd5d1a57ca1d5440593050fdc596d377">
<div></div>
<input type="hidden" name="subject" value="New matrix benchmarks to evaluate ::setConcat implementation options">
<input type="hidden" name="message_only" value="1">
<input type="submit" value="Send Message">
<input type="button" value="Discard" name="discard">
<input type="checkbox" name="send_mail" value="1" id="message-reply-send-mail" checked="checked">
<label>Send mail to reviewers</label>
</form>
</div>
<a id="resizer" class="resizer" style="display:none;cursor:pointer">
<img src="/static/zippyplus.gif">
</a>
</td>
</tr>
</tbody></table>
</div>
<div class="popup" id="popup-issue" style="left: 104px; top: 116px; visibility: hidden; ">
<b>Issue 4571045: New matrix benchmarks to evaluate ::setConcat implementation options
</b><br>
Created 16 minutes ago by me<br>
Modified 0 minutes ago<br>
Reviewers: reed1<br>
Base URL: http://skia.googlecode.com/svn/trunk/<br>
Comments: 0
</div>
<p></p>
<div style="float: left;">
<a target="_blank" href="http://code.google.com/appengine/"><img border="0" src="/static/appengine-noborder-120x30.gif" alt="Powered by Google App Engine"></a>
</div>
<div class="extra" style="font-size: 9pt; float: right; text-align: right;">
<div style="height:14px;">
<img src="/static/rss.gif" alt="RSS Feeds" width="14" height="14" align="top">
<a href="/rss/all">Recent Issues</a>
|
<a href="/rss/mine/TomH">My Issues</a>
|
<a href="/rss/reviews/TomH">My Reviews</a>
|
<a href="/rss/closed/TomH">My Closed</a>
|
<a href="/rss/issue/4571045">This issue</a>
</div>
<div style="margin-top: .3em;">This is Rietveld <a href="http://code.google.com/p/rietveld/updates/list">r756
</a></div>
</div>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script><script src="http://www.google-analytics.com/ga.js" type="text/javascript"></script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-4803694-4");
pageTracker._initData();
pageTracker._trackPageview();
</script>
On platforms that use Float (instead of Fixed), SkMatrix stores its internal
values as floats, but setConcat() needs extra precision and so uses doubles
to contain intermediate values.
These three benchmarks compare the speed of float-only, double-only, and
float-cast-to-double implementations of a chunk of code extracted from the
non-perspective case of setConcat().
git-svn-id: http://skia.googlecode.com/svn/trunk@1497 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-06-03 19:16:56 +00:00
|
|
|
static inline void muladdmul(float a, float b, float c, float d,
|
|
|
|
float* result) {
|
|
|
|
*result = SkDoubleToFloat((double)a * b + (double)c * d);
|
|
|
|
}
|
|
|
|
virtual void performTest() {
|
2011-06-03 20:32:58 +00:00
|
|
|
const float* a = mya;
|
|
|
|
const float* b = myb;
|
|
|
|
float* r = myr;
|
<body onunload="M_unloadPage();">
<!-- Begin help window -->
<script type="text/javascript"><!--
var xsrfToken = 'dd5d1a57ca1d5440593050fdc596d377';
var helpDisplayed = false;
document.onclick = M_clickCommon;
var media_url = "/static/";
var base_url = "/";
var publish_link = "/4571045/publish";
// -->
</script>
<div id="help" style="display: none;">
<div style="font-size: medium; text-align: center;">Keyboard Shortcuts</div>
<hr>
<table width="100%">
<tbody><tr valign="top">
<td>
<table width="100%">
<tbody><tr>
<td></td><th>File</th>
</tr>
<tr>
<td class="shortcut"><span class="letter">u</span> <b>:</b></td><td>up to issue</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">m</span> <b>:</b></td><td>publish + mail comments</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">M</span> <b>:</b></td><td>edit review message</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">j</span> / <span class="letter">k</span> <b>:</b></td><td>jump to file after / before current file</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">J</span> / <span class="letter">K</span> <b>:</b></td><td>jump to next file with a comment after / before current file</td>
</tr>
<tr>
<td></td><th>Side-by-side diff</th>
</tr>
<tr>
<td class="shortcut"><span class="letter">i</span> <b>:</b></td><td>toggle intra-line diffs</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">e</span> <b>:</b></td><td>expand all comments</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">c</span> <b>:</b></td><td>collapse all comments</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">s</span> <b>:</b></td><td>toggle showing all comments</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">n</span> / <span class="letter">p</span> <b>:</b></td><td>next / previous diff chunk or comment</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">N</span> / <span class="letter">P</span> <b>:</b></td><td>next / previous comment</td>
</tr>
<tr>
<td class="shortcut"><span class="letter"><Enter></span> <b>:</b></td><td>respond to / edit current comment</td>
</tr>
</tbody></table>
</td>
<td>
<table width="100%">
<tbody><tr>
<td></td><th>Issue</th>
</tr>
<tr>
<td class="shortcut"><span class="letter">u</span> <b>:</b></td><td>up to list of issues</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">m</span> <b>:</b></td><td>publish + mail comments</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">j</span> / <span class="letter">k</span> <b>:</b></td><td>jump to patch after / before current patch</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">o</span> / <span class="letter"><Enter></span> <b>:</b></td><td>open current patch in side-by-side view</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">i</span> <b>:</b></td><td>open current patch in unified diff view</td>
</tr>
<tr><td> </td></tr>
<tr><td></td><th>Issue List</th></tr>
<tr>
<td class="shortcut"><span class="letter">j</span> / <span class="letter">k</span> <b>:</b></td><td>jump to issue after / before current issue</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">o</span> / <span class="letter"><Enter></span> <b>:</b></td><td>open current issue</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">#</span> <b>:</b></td>
<td>close issue</td>
</tr>
<tr><td> </td></tr>
<tr>
<td></td><th>Comment/message editing</th>
</tr>
<tr>
<td class="shortcut"><span class="letter"><Ctrl></span> + <span class="letter">s</span> <b>:</b></td><td>save comment</td>
</tr>
<tr>
<td class="shortcut"><span class="letter"><Esc></span> <b>:</b></td><td>cancel edit</td>
</tr>
</tbody></table>
</td>
</tr>
</tbody></table>
</div>
<!-- End help window -->
<div align="right">
<div style="float:left; font-weight:bold"><i>Rietveld</i> Code Review Tool</div>
<b>tomhudson@google.com (TomH)</b>
|
<a class="novisit" href="/settings">Settings</a>
|
<a class="novisit" target="_blank" href="http://code.google.com/p/rietveld/wiki/CodeReviewHelp">Help</a>
|
<a class="novisit" target="_blank" href="http://code.google.com/p/rietveld/issues/list">Bug tracker</a>
|
<a class="novisit" target="_blank" href="http://groups.google.com/group/codereview-discuss">Discussion group</a>
|
<a class="novisit" target="_blank" href="http://code.google.com/p/rietveld">Source code</a>
|
<a class="novisit" href="http://codereview.appspot.com/_ah/logout?continue=https://www.google.com/accounts/Logout%3Fcontinue%3Dhttps://appengine.google.com/_ah/logout%253Fcontinue%253Dhttp://codereview.appspot.com/4571045/%26service%3Dah">Sign out</a>
</div>
<div class="counter">(691)</div>
<div class="mainmenu">
<a href="/" class="active">Issues</a>
<a href="/repos">Repositories</a>
<a href="/search">Search</a>
</div>
<div class="mainmenu2">
<a href="/use_uploadpy">Create Issue</a>
|
<a href="/mine">My Issues</a>
|
<a href="/starred">Starred</a>
|
<a href="/all">Open</a>
|
<a href="/all?closed=1">All</a>
</div>
<div>
<h2>
<span id="issue-star-4571045">
<a href="javascript:M_addIssueStar(4571045)">
<img src="/static/star-dark.gif" width="15" height="15" border="0"></a>
</span>
<span class="issue-close" id="issue-close-4571045">
<a href="javascript:M_closeIssue(4571045)">
<img src="/static/close.gif" title="Close This Issue" width="15" height="15" border="0"></a>
</span>
Issue <a href="/4571045/" onmouseover="M_showPopUp(this, 'popup-issue');">
4571045</a>:
New matrix benchmarks to evaluate ::setConcat implementation options
</h2>
<table class="issue-details" border="0" width="100%">
<tbody><tr valign="top">
<td class="meta" width="20%">
<div>
<a class="novisit" href="/4571045/edit">
Edit Issue
</a>
<br>
<a class="novisit" href="/4571045/publish">
Publish+Mail Comments
</a> ('m')
<br>
<a class="novisit" href="/4571045/diff/1/bench/MatrixBench.cpp">
<b>Start Review</b>
</a>
</div>
<div class="issue_details_sidebar">
<div><b>Created:</b><br>
16 minutes ago by me
</div>
<div><b>Modified:</b><br>
0 minutes ago
</div>
<div><b>Reviewers:</b><br>
<a href="/user/reed1" onmouseover="M_showUserInfoPopup(this)">reed1</a>
</div>
<div><b>CC:</b><br>
</div>
<div><b>Base URL:</b><br>
http://skia.googlecode.com/svn/trunk/
</div>
<div><b>Visibility:</b><br>
Public.
</div>
</div>
</td>
<td style="padding-left: .8em; padding-right: .8em;" width="80%">
<h3><a id="issue-description-pointer" href="javascript:M_toggleSection('issue-description')" class="toggled-section opentriangle">
Description</a></h3>
<div id="issue-description" style="margin-left:15px;">
<pre>On platforms that use Float (instead of Fixed), SkMatrix stores its internal
values as floats, but setConcat() needs extra precision and so uses doubles to
contain intermediate values.
These three benchmarks compare the speed of float-only, double-only, and
float-cast-to-double implementations of a chunk of code extracted from the
non-perspective case of setConcat().
</pre>
</div>
<h3>
<a id="ps-1-pointer" href="javascript:M_toggleSectionForPS('4571045', '1')" class="toggled-section opentriangle">
Patch Set 1
</a>
</h3>
<div id="ps-1" style="">
<div class="issue-list">
<div class="pagination">
<div style="float: left;">
<i>Created:</i> 16 minutes ago
</div>
<div style="float: right;">
<a href="/download/issue4571045_1.diff">
Download raw patch set</a>
</div>
<div style="clear:both;"></div>
</div>
<table id="queues" style="clear:both;">
<tbody><tr align="left">
<th colspan="2"></th>
<th>Unified diffs</th>
<th>Side-by-side diffs</th>
<th>Delta from patch set</th>
<th colspan="3">Stats</th>
<th>Patch</th>
</tr>
<tr name="patch">
<td class="first" width="14"><img src="/static/closedtriangle.gif" style="" width="12" height="9"></td>
<td style="white-space: nowrap">M </td>
<td>
<a class="noul" href="/4571045/patch/1/2">
bench/MatrixBench.cpp
</a>
</td>
<td>
<a class="noul" href="/4571045/diff/1/bench/MatrixBench.cpp">
View
</a>
</td>
<td style="white-space: nowrap">
</td>
<td style="white-space: nowrap">4 chunks</td>
<td style="white-space: nowrap">+114 lines, -3 lines</td>
<td style="white-space: nowrap">
0 comments
</td>
<td>
<a href="/download/issue4571045_1_2.diff" title="Download patch for bench/MatrixBench.cpp">
Download
</a>
</td>
</tr>
</tbody></table>
</div>
</div>
<h3>
<a id="messages-pointer" href="javascript:M_toggleSection('messages')" class="toggled-section opentriangle">
Messages
</a>
</h3>
<div><i>Total messages: 3</i></div>
<div id="messages">
<div style="margin-bottom: .5em;">
<a href="javascript:M_showAllComments('cl', 3)">
Expand All Messages</a>
|
<a href="javascript:M_hideAllComments('cl', 3)">
Collapse All Messages</a>
</div>
<div class="message " id="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UY6QcM" name="0">
<a name="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UY6QcM"></a>
<div class="header">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tbody><tr class="comment_title" onclick="M_switchChangelistComment(0)">
<td style="padding-left: 5px; white-space: nowrap;">
<b>me</b>
</td>
<td width="100%">
<table style="table-layout:fixed; white-space: nowrap;" width="100%">
<tbody><tr>
<td>
<div style="white-space: nowrap; overflow: hidden;" class="extra" id="cl-preview-0">
</div>
</td>
</tr>
</tbody></table>
</td>
<td align="right" style="white-space: nowrap; padding-right: 5px;">
13 minutes ago
</td>
</tr>
</tbody></table>
</div>
<div id="cl-comment-0" style="display: none;">
<div class="message-body">
<pre name="cl-message-0"></pre>
</div>
<div class="message-actions">
<a href="javascript:M_replyToMessage('0', '2011/06/03 18:57:35', 'TomH')" id="message-reply-href-0">Reply</a>
<textarea rows="7" cols="70" name="message" style="display:none"></textarea>
<div id="message-reply-0" style="display:none;"></div>
</div>
</div>
</div>
<div class="message " id="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UY0Q8M" name="1">
<a name="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UY0Q8M"></a>
<div class="header">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tbody><tr class="comment_title" onclick="M_switchChangelistComment(1)">
<td style="padding-left: 5px; white-space: nowrap;">
<b>reed1</b>
</td>
<td width="100%">
<table style="table-layout:fixed; white-space: nowrap;" width="100%">
<tbody><tr>
<td>
<div style="white-space: nowrap; overflow: hidden;" class="extra" id="cl-preview-1">
1. lets remove the "fix" from the function name. just muladdmul I think 2. we ...
</div>
</td>
</tr>
</tbody></table>
</td>
<td align="right" style="white-space: nowrap; padding-right: 5px;">
10 minutes ago
</td>
</tr>
</tbody></table>
</div>
<div id="cl-comment-1" style="display: none;">
<div class="message-body">
<pre name="cl-message-1">1. lets remove the "fix" from the function name. just muladdmul I think
2. we can remove the return, since it will be compiled away anyway
3. nice checkin comment!
4. what are the results like?</pre>
</div>
<div class="message-actions">
<a href="javascript:M_replyToMessage('1', '2011/06/03 19:00:39', 'reed1')" id="message-reply-href-1">Reply</a>
<textarea rows="7" cols="70" name="message" style="display:none"></textarea>
<div id="message-reply-1" style="display:none;"></div>
</div>
</div>
</div>
<div class="message " id="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UYuRcM" name="2">
<a name="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UYuRcM"></a>
<div class="header">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tbody><tr class="comment_title" onclick="M_switchChangelistComment(2)">
<td style="padding-left: 5px; white-space: nowrap;">
<b>me</b>
</td>
<td width="100%">
<table style="table-layout:fixed; white-space: nowrap;" width="100%">
<tbody><tr>
<td>
<div style="white-space: nowrap; overflow: hidden; visibility: hidden;" class="extra" id="cl-preview-2">
> 4. what are the results like? For posterity: tomhudson@tomhudson-zx600-linux:/usr/local/google/src/skia3$ out/bench/bench -match matrix_concat -repeat 1000 ...
</div>
</td>
</tr>
</tbody></table>
</td>
<td align="right" style="white-space: nowrap; padding-right: 5px;">
0 minutes ago
</td>
</tr>
</tbody></table>
</div>
<div id="cl-comment-2">
<div class="message-body">
<pre name="cl-message-2">> 4. what are the results like?
For posterity:
tomhudson@tomhudson-zx600-linux:/usr/local/google/src/skia3$ out/bench/bench
-match matrix_concat -repeat 1000
skia bench: alpha=0xFF antialias=1 filter=0
running bench [640 480] matrix_concat_double 8888: msecs = 0.79 565:
msecs = 0.79 GPU: msecs = 0.79
running bench [640 480] matrix_concat_floatdouble 8888: msecs = 0.97 565:
msecs = 0.97 GPU: msecs = 0.97
running bench [640 480] matrix_concat_float 8888: msecs = 0.74 565:
msecs = 0.73 GPU: msecs = 0.74</pre>
</div>
<div class="message-actions">
<a href="javascript:M_replyToMessage('2', '2011/06/03 19:11:06', 'TomH')" id="message-reply-href-2">Reply</a>
<textarea rows="7" cols="70" name="message" style="display:none"></textarea>
<div id="message-reply-2" style="display:none;"></div>
</div>
</div>
</div>
<div>
<a href="javascript:M_showAllComments('cl', 3)">
Expand All Messages</a>
|
<a href="javascript:M_hideAllComments('cl', 3)">
Collapse All Messages</a>
</div>
</div>
<script language="JavaScript" type="text/javascript">
<!--
document.onkeydown = M_changelistKeyDown;
var dashboardState = new M_DashboardState(window, 'patch', 'M_CLPatchMarker');
M_switchChangelistCommentByAnchor();
// -->
</script>
<div style="display:none;">
<form method="POST" action="/4571045/publish" id="message-reply-form">
<input type="hidden" name="xsrf_token" value="dd5d1a57ca1d5440593050fdc596d377">
<div></div>
<input type="hidden" name="subject" value="New matrix benchmarks to evaluate ::setConcat implementation options">
<input type="hidden" name="message_only" value="1">
<input type="submit" value="Send Message">
<input type="button" value="Discard" name="discard">
<input type="checkbox" name="send_mail" value="1" id="message-reply-send-mail" checked="checked">
<label>Send mail to reviewers</label>
</form>
</div>
<a id="resizer" class="resizer" style="display:none;cursor:pointer">
<img src="/static/zippyplus.gif">
</a>
</td>
</tr>
</tbody></table>
</div>
<div class="popup" id="popup-issue" style="left: 104px; top: 116px; visibility: hidden; ">
<b>Issue 4571045: New matrix benchmarks to evaluate ::setConcat implementation options
</b><br>
Created 16 minutes ago by me<br>
Modified 0 minutes ago<br>
Reviewers: reed1<br>
Base URL: http://skia.googlecode.com/svn/trunk/<br>
Comments: 0
</div>
<p></p>
<div style="float: left;">
<a target="_blank" href="http://code.google.com/appengine/"><img border="0" src="/static/appengine-noborder-120x30.gif" alt="Powered by Google App Engine"></a>
</div>
<div class="extra" style="font-size: 9pt; float: right; text-align: right;">
<div style="height:14px;">
<img src="/static/rss.gif" alt="RSS Feeds" width="14" height="14" align="top">
<a href="/rss/all">Recent Issues</a>
|
<a href="/rss/mine/TomH">My Issues</a>
|
<a href="/rss/reviews/TomH">My Reviews</a>
|
<a href="/rss/closed/TomH">My Closed</a>
|
<a href="/rss/issue/4571045">This issue</a>
</div>
<div style="margin-top: .3em;">This is Rietveld <a href="http://code.google.com/p/rietveld/updates/list">r756
</a></div>
</div>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script><script src="http://www.google-analytics.com/ga.js" type="text/javascript"></script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-4803694-4");
pageTracker._initData();
pageTracker._trackPageview();
</script>
On platforms that use Float (instead of Fixed), SkMatrix stores its internal
values as floats, but setConcat() needs extra precision and so uses doubles
to contain intermediate values.
These three benchmarks compare the speed of float-only, double-only, and
float-cast-to-double implementations of a chunk of code extracted from the
non-perspective case of setConcat().
git-svn-id: http://skia.googlecode.com/svn/trunk@1497 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-06-03 19:16:56 +00:00
|
|
|
muladdmul(a[0], b[0], a[1], b[3], &r[0]);
|
|
|
|
muladdmul(a[0], b[1], a[1], b[4], &r[1]);
|
|
|
|
muladdmul(a[0], b[2], a[1], b[5], &r[2]);
|
2011-06-03 20:32:58 +00:00
|
|
|
r[2] += a[2];
|
<body onunload="M_unloadPage();">
<!-- Begin help window -->
<script type="text/javascript"><!--
var xsrfToken = 'dd5d1a57ca1d5440593050fdc596d377';
var helpDisplayed = false;
document.onclick = M_clickCommon;
var media_url = "/static/";
var base_url = "/";
var publish_link = "/4571045/publish";
// -->
</script>
<div id="help" style="display: none;">
<div style="font-size: medium; text-align: center;">Keyboard Shortcuts</div>
<hr>
<table width="100%">
<tbody><tr valign="top">
<td>
<table width="100%">
<tbody><tr>
<td></td><th>File</th>
</tr>
<tr>
<td class="shortcut"><span class="letter">u</span> <b>:</b></td><td>up to issue</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">m</span> <b>:</b></td><td>publish + mail comments</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">M</span> <b>:</b></td><td>edit review message</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">j</span> / <span class="letter">k</span> <b>:</b></td><td>jump to file after / before current file</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">J</span> / <span class="letter">K</span> <b>:</b></td><td>jump to next file with a comment after / before current file</td>
</tr>
<tr>
<td></td><th>Side-by-side diff</th>
</tr>
<tr>
<td class="shortcut"><span class="letter">i</span> <b>:</b></td><td>toggle intra-line diffs</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">e</span> <b>:</b></td><td>expand all comments</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">c</span> <b>:</b></td><td>collapse all comments</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">s</span> <b>:</b></td><td>toggle showing all comments</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">n</span> / <span class="letter">p</span> <b>:</b></td><td>next / previous diff chunk or comment</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">N</span> / <span class="letter">P</span> <b>:</b></td><td>next / previous comment</td>
</tr>
<tr>
<td class="shortcut"><span class="letter"><Enter></span> <b>:</b></td><td>respond to / edit current comment</td>
</tr>
</tbody></table>
</td>
<td>
<table width="100%">
<tbody><tr>
<td></td><th>Issue</th>
</tr>
<tr>
<td class="shortcut"><span class="letter">u</span> <b>:</b></td><td>up to list of issues</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">m</span> <b>:</b></td><td>publish + mail comments</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">j</span> / <span class="letter">k</span> <b>:</b></td><td>jump to patch after / before current patch</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">o</span> / <span class="letter"><Enter></span> <b>:</b></td><td>open current patch in side-by-side view</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">i</span> <b>:</b></td><td>open current patch in unified diff view</td>
</tr>
<tr><td> </td></tr>
<tr><td></td><th>Issue List</th></tr>
<tr>
<td class="shortcut"><span class="letter">j</span> / <span class="letter">k</span> <b>:</b></td><td>jump to issue after / before current issue</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">o</span> / <span class="letter"><Enter></span> <b>:</b></td><td>open current issue</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">#</span> <b>:</b></td>
<td>close issue</td>
</tr>
<tr><td> </td></tr>
<tr>
<td></td><th>Comment/message editing</th>
</tr>
<tr>
<td class="shortcut"><span class="letter"><Ctrl></span> + <span class="letter">s</span> <b>:</b></td><td>save comment</td>
</tr>
<tr>
<td class="shortcut"><span class="letter"><Esc></span> <b>:</b></td><td>cancel edit</td>
</tr>
</tbody></table>
</td>
</tr>
</tbody></table>
</div>
<!-- End help window -->
<div align="right">
<div style="float:left; font-weight:bold"><i>Rietveld</i> Code Review Tool</div>
<b>tomhudson@google.com (TomH)</b>
|
<a class="novisit" href="/settings">Settings</a>
|
<a class="novisit" target="_blank" href="http://code.google.com/p/rietveld/wiki/CodeReviewHelp">Help</a>
|
<a class="novisit" target="_blank" href="http://code.google.com/p/rietveld/issues/list">Bug tracker</a>
|
<a class="novisit" target="_blank" href="http://groups.google.com/group/codereview-discuss">Discussion group</a>
|
<a class="novisit" target="_blank" href="http://code.google.com/p/rietveld">Source code</a>
|
<a class="novisit" href="http://codereview.appspot.com/_ah/logout?continue=https://www.google.com/accounts/Logout%3Fcontinue%3Dhttps://appengine.google.com/_ah/logout%253Fcontinue%253Dhttp://codereview.appspot.com/4571045/%26service%3Dah">Sign out</a>
</div>
<div class="counter">(691)</div>
<div class="mainmenu">
<a href="/" class="active">Issues</a>
<a href="/repos">Repositories</a>
<a href="/search">Search</a>
</div>
<div class="mainmenu2">
<a href="/use_uploadpy">Create Issue</a>
|
<a href="/mine">My Issues</a>
|
<a href="/starred">Starred</a>
|
<a href="/all">Open</a>
|
<a href="/all?closed=1">All</a>
</div>
<div>
<h2>
<span id="issue-star-4571045">
<a href="javascript:M_addIssueStar(4571045)">
<img src="/static/star-dark.gif" width="15" height="15" border="0"></a>
</span>
<span class="issue-close" id="issue-close-4571045">
<a href="javascript:M_closeIssue(4571045)">
<img src="/static/close.gif" title="Close This Issue" width="15" height="15" border="0"></a>
</span>
Issue <a href="/4571045/" onmouseover="M_showPopUp(this, 'popup-issue');">
4571045</a>:
New matrix benchmarks to evaluate ::setConcat implementation options
</h2>
<table class="issue-details" border="0" width="100%">
<tbody><tr valign="top">
<td class="meta" width="20%">
<div>
<a class="novisit" href="/4571045/edit">
Edit Issue
</a>
<br>
<a class="novisit" href="/4571045/publish">
Publish+Mail Comments
</a> ('m')
<br>
<a class="novisit" href="/4571045/diff/1/bench/MatrixBench.cpp">
<b>Start Review</b>
</a>
</div>
<div class="issue_details_sidebar">
<div><b>Created:</b><br>
16 minutes ago by me
</div>
<div><b>Modified:</b><br>
0 minutes ago
</div>
<div><b>Reviewers:</b><br>
<a href="/user/reed1" onmouseover="M_showUserInfoPopup(this)">reed1</a>
</div>
<div><b>CC:</b><br>
</div>
<div><b>Base URL:</b><br>
http://skia.googlecode.com/svn/trunk/
</div>
<div><b>Visibility:</b><br>
Public.
</div>
</div>
</td>
<td style="padding-left: .8em; padding-right: .8em;" width="80%">
<h3><a id="issue-description-pointer" href="javascript:M_toggleSection('issue-description')" class="toggled-section opentriangle">
Description</a></h3>
<div id="issue-description" style="margin-left:15px;">
<pre>On platforms that use Float (instead of Fixed), SkMatrix stores its internal
values as floats, but setConcat() needs extra precision and so uses doubles to
contain intermediate values.
These three benchmarks compare the speed of float-only, double-only, and
float-cast-to-double implementations of a chunk of code extracted from the
non-perspective case of setConcat().
</pre>
</div>
<h3>
<a id="ps-1-pointer" href="javascript:M_toggleSectionForPS('4571045', '1')" class="toggled-section opentriangle">
Patch Set 1
</a>
</h3>
<div id="ps-1" style="">
<div class="issue-list">
<div class="pagination">
<div style="float: left;">
<i>Created:</i> 16 minutes ago
</div>
<div style="float: right;">
<a href="/download/issue4571045_1.diff">
Download raw patch set</a>
</div>
<div style="clear:both;"></div>
</div>
<table id="queues" style="clear:both;">
<tbody><tr align="left">
<th colspan="2"></th>
<th>Unified diffs</th>
<th>Side-by-side diffs</th>
<th>Delta from patch set</th>
<th colspan="3">Stats</th>
<th>Patch</th>
</tr>
<tr name="patch">
<td class="first" width="14"><img src="/static/closedtriangle.gif" style="" width="12" height="9"></td>
<td style="white-space: nowrap">M </td>
<td>
<a class="noul" href="/4571045/patch/1/2">
bench/MatrixBench.cpp
</a>
</td>
<td>
<a class="noul" href="/4571045/diff/1/bench/MatrixBench.cpp">
View
</a>
</td>
<td style="white-space: nowrap">
</td>
<td style="white-space: nowrap">4 chunks</td>
<td style="white-space: nowrap">+114 lines, -3 lines</td>
<td style="white-space: nowrap">
0 comments
</td>
<td>
<a href="/download/issue4571045_1_2.diff" title="Download patch for bench/MatrixBench.cpp">
Download
</a>
</td>
</tr>
</tbody></table>
</div>
</div>
<h3>
<a id="messages-pointer" href="javascript:M_toggleSection('messages')" class="toggled-section opentriangle">
Messages
</a>
</h3>
<div><i>Total messages: 3</i></div>
<div id="messages">
<div style="margin-bottom: .5em;">
<a href="javascript:M_showAllComments('cl', 3)">
Expand All Messages</a>
|
<a href="javascript:M_hideAllComments('cl', 3)">
Collapse All Messages</a>
</div>
<div class="message " id="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UY6QcM" name="0">
<a name="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UY6QcM"></a>
<div class="header">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tbody><tr class="comment_title" onclick="M_switchChangelistComment(0)">
<td style="padding-left: 5px; white-space: nowrap;">
<b>me</b>
</td>
<td width="100%">
<table style="table-layout:fixed; white-space: nowrap;" width="100%">
<tbody><tr>
<td>
<div style="white-space: nowrap; overflow: hidden;" class="extra" id="cl-preview-0">
</div>
</td>
</tr>
</tbody></table>
</td>
<td align="right" style="white-space: nowrap; padding-right: 5px;">
13 minutes ago
</td>
</tr>
</tbody></table>
</div>
<div id="cl-comment-0" style="display: none;">
<div class="message-body">
<pre name="cl-message-0"></pre>
</div>
<div class="message-actions">
<a href="javascript:M_replyToMessage('0', '2011/06/03 18:57:35', 'TomH')" id="message-reply-href-0">Reply</a>
<textarea rows="7" cols="70" name="message" style="display:none"></textarea>
<div id="message-reply-0" style="display:none;"></div>
</div>
</div>
</div>
<div class="message " id="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UY0Q8M" name="1">
<a name="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UY0Q8M"></a>
<div class="header">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tbody><tr class="comment_title" onclick="M_switchChangelistComment(1)">
<td style="padding-left: 5px; white-space: nowrap;">
<b>reed1</b>
</td>
<td width="100%">
<table style="table-layout:fixed; white-space: nowrap;" width="100%">
<tbody><tr>
<td>
<div style="white-space: nowrap; overflow: hidden;" class="extra" id="cl-preview-1">
1. lets remove the "fix" from the function name. just muladdmul I think 2. we ...
</div>
</td>
</tr>
</tbody></table>
</td>
<td align="right" style="white-space: nowrap; padding-right: 5px;">
10 minutes ago
</td>
</tr>
</tbody></table>
</div>
<div id="cl-comment-1" style="display: none;">
<div class="message-body">
<pre name="cl-message-1">1. lets remove the "fix" from the function name. just muladdmul I think
2. we can remove the return, since it will be compiled away anyway
3. nice checkin comment!
4. what are the results like?</pre>
</div>
<div class="message-actions">
<a href="javascript:M_replyToMessage('1', '2011/06/03 19:00:39', 'reed1')" id="message-reply-href-1">Reply</a>
<textarea rows="7" cols="70" name="message" style="display:none"></textarea>
<div id="message-reply-1" style="display:none;"></div>
</div>
</div>
</div>
<div class="message " id="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UYuRcM" name="2">
<a name="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UYuRcM"></a>
<div class="header">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tbody><tr class="comment_title" onclick="M_switchChangelistComment(2)">
<td style="padding-left: 5px; white-space: nowrap;">
<b>me</b>
</td>
<td width="100%">
<table style="table-layout:fixed; white-space: nowrap;" width="100%">
<tbody><tr>
<td>
<div style="white-space: nowrap; overflow: hidden; visibility: hidden;" class="extra" id="cl-preview-2">
> 4. what are the results like? For posterity: tomhudson@tomhudson-zx600-linux:/usr/local/google/src/skia3$ out/bench/bench -match matrix_concat -repeat 1000 ...
</div>
</td>
</tr>
</tbody></table>
</td>
<td align="right" style="white-space: nowrap; padding-right: 5px;">
0 minutes ago
</td>
</tr>
</tbody></table>
</div>
<div id="cl-comment-2">
<div class="message-body">
<pre name="cl-message-2">> 4. what are the results like?
For posterity:
tomhudson@tomhudson-zx600-linux:/usr/local/google/src/skia3$ out/bench/bench
-match matrix_concat -repeat 1000
skia bench: alpha=0xFF antialias=1 filter=0
running bench [640 480] matrix_concat_double 8888: msecs = 0.79 565:
msecs = 0.79 GPU: msecs = 0.79
running bench [640 480] matrix_concat_floatdouble 8888: msecs = 0.97 565:
msecs = 0.97 GPU: msecs = 0.97
running bench [640 480] matrix_concat_float 8888: msecs = 0.74 565:
msecs = 0.73 GPU: msecs = 0.74</pre>
</div>
<div class="message-actions">
<a href="javascript:M_replyToMessage('2', '2011/06/03 19:11:06', 'TomH')" id="message-reply-href-2">Reply</a>
<textarea rows="7" cols="70" name="message" style="display:none"></textarea>
<div id="message-reply-2" style="display:none;"></div>
</div>
</div>
</div>
<div>
<a href="javascript:M_showAllComments('cl', 3)">
Expand All Messages</a>
|
<a href="javascript:M_hideAllComments('cl', 3)">
Collapse All Messages</a>
</div>
</div>
<script language="JavaScript" type="text/javascript">
<!--
document.onkeydown = M_changelistKeyDown;
var dashboardState = new M_DashboardState(window, 'patch', 'M_CLPatchMarker');
M_switchChangelistCommentByAnchor();
// -->
</script>
<div style="display:none;">
<form method="POST" action="/4571045/publish" id="message-reply-form">
<input type="hidden" name="xsrf_token" value="dd5d1a57ca1d5440593050fdc596d377">
<div></div>
<input type="hidden" name="subject" value="New matrix benchmarks to evaluate ::setConcat implementation options">
<input type="hidden" name="message_only" value="1">
<input type="submit" value="Send Message">
<input type="button" value="Discard" name="discard">
<input type="checkbox" name="send_mail" value="1" id="message-reply-send-mail" checked="checked">
<label>Send mail to reviewers</label>
</form>
</div>
<a id="resizer" class="resizer" style="display:none;cursor:pointer">
<img src="/static/zippyplus.gif">
</a>
</td>
</tr>
</tbody></table>
</div>
<div class="popup" id="popup-issue" style="left: 104px; top: 116px; visibility: hidden; ">
<b>Issue 4571045: New matrix benchmarks to evaluate ::setConcat implementation options
</b><br>
Created 16 minutes ago by me<br>
Modified 0 minutes ago<br>
Reviewers: reed1<br>
Base URL: http://skia.googlecode.com/svn/trunk/<br>
Comments: 0
</div>
<p></p>
<div style="float: left;">
<a target="_blank" href="http://code.google.com/appengine/"><img border="0" src="/static/appengine-noborder-120x30.gif" alt="Powered by Google App Engine"></a>
</div>
<div class="extra" style="font-size: 9pt; float: right; text-align: right;">
<div style="height:14px;">
<img src="/static/rss.gif" alt="RSS Feeds" width="14" height="14" align="top">
<a href="/rss/all">Recent Issues</a>
|
<a href="/rss/mine/TomH">My Issues</a>
|
<a href="/rss/reviews/TomH">My Reviews</a>
|
<a href="/rss/closed/TomH">My Closed</a>
|
<a href="/rss/issue/4571045">This issue</a>
</div>
<div style="margin-top: .3em;">This is Rietveld <a href="http://code.google.com/p/rietveld/updates/list">r756
</a></div>
</div>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script><script src="http://www.google-analytics.com/ga.js" type="text/javascript"></script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-4803694-4");
pageTracker._initData();
pageTracker._trackPageview();
</script>
On platforms that use Float (instead of Fixed), SkMatrix stores its internal
values as floats, but setConcat() needs extra precision and so uses doubles
to contain intermediate values.
These three benchmarks compare the speed of float-only, double-only, and
float-cast-to-double implementations of a chunk of code extracted from the
non-perspective case of setConcat().
git-svn-id: http://skia.googlecode.com/svn/trunk@1497 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-06-03 19:16:56 +00:00
|
|
|
muladdmul(a[3], b[0], a[4], b[3], &r[3]);
|
|
|
|
muladdmul(a[3], b[1], a[4], b[4], &r[4]);
|
|
|
|
muladdmul(a[3], b[2], a[4], b[5], &r[5]);
|
2011-06-03 20:32:58 +00:00
|
|
|
r[5] += a[5];
|
|
|
|
r[6] = r[7] = 0.0f;
|
|
|
|
r[8] = 1.0f;
|
<body onunload="M_unloadPage();">
<!-- Begin help window -->
<script type="text/javascript"><!--
var xsrfToken = 'dd5d1a57ca1d5440593050fdc596d377';
var helpDisplayed = false;
document.onclick = M_clickCommon;
var media_url = "/static/";
var base_url = "/";
var publish_link = "/4571045/publish";
// -->
</script>
<div id="help" style="display: none;">
<div style="font-size: medium; text-align: center;">Keyboard Shortcuts</div>
<hr>
<table width="100%">
<tbody><tr valign="top">
<td>
<table width="100%">
<tbody><tr>
<td></td><th>File</th>
</tr>
<tr>
<td class="shortcut"><span class="letter">u</span> <b>:</b></td><td>up to issue</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">m</span> <b>:</b></td><td>publish + mail comments</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">M</span> <b>:</b></td><td>edit review message</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">j</span> / <span class="letter">k</span> <b>:</b></td><td>jump to file after / before current file</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">J</span> / <span class="letter">K</span> <b>:</b></td><td>jump to next file with a comment after / before current file</td>
</tr>
<tr>
<td></td><th>Side-by-side diff</th>
</tr>
<tr>
<td class="shortcut"><span class="letter">i</span> <b>:</b></td><td>toggle intra-line diffs</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">e</span> <b>:</b></td><td>expand all comments</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">c</span> <b>:</b></td><td>collapse all comments</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">s</span> <b>:</b></td><td>toggle showing all comments</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">n</span> / <span class="letter">p</span> <b>:</b></td><td>next / previous diff chunk or comment</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">N</span> / <span class="letter">P</span> <b>:</b></td><td>next / previous comment</td>
</tr>
<tr>
<td class="shortcut"><span class="letter"><Enter></span> <b>:</b></td><td>respond to / edit current comment</td>
</tr>
</tbody></table>
</td>
<td>
<table width="100%">
<tbody><tr>
<td></td><th>Issue</th>
</tr>
<tr>
<td class="shortcut"><span class="letter">u</span> <b>:</b></td><td>up to list of issues</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">m</span> <b>:</b></td><td>publish + mail comments</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">j</span> / <span class="letter">k</span> <b>:</b></td><td>jump to patch after / before current patch</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">o</span> / <span class="letter"><Enter></span> <b>:</b></td><td>open current patch in side-by-side view</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">i</span> <b>:</b></td><td>open current patch in unified diff view</td>
</tr>
<tr><td> </td></tr>
<tr><td></td><th>Issue List</th></tr>
<tr>
<td class="shortcut"><span class="letter">j</span> / <span class="letter">k</span> <b>:</b></td><td>jump to issue after / before current issue</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">o</span> / <span class="letter"><Enter></span> <b>:</b></td><td>open current issue</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">#</span> <b>:</b></td>
<td>close issue</td>
</tr>
<tr><td> </td></tr>
<tr>
<td></td><th>Comment/message editing</th>
</tr>
<tr>
<td class="shortcut"><span class="letter"><Ctrl></span> + <span class="letter">s</span> <b>:</b></td><td>save comment</td>
</tr>
<tr>
<td class="shortcut"><span class="letter"><Esc></span> <b>:</b></td><td>cancel edit</td>
</tr>
</tbody></table>
</td>
</tr>
</tbody></table>
</div>
<!-- End help window -->
<div align="right">
<div style="float:left; font-weight:bold"><i>Rietveld</i> Code Review Tool</div>
<b>tomhudson@google.com (TomH)</b>
|
<a class="novisit" href="/settings">Settings</a>
|
<a class="novisit" target="_blank" href="http://code.google.com/p/rietveld/wiki/CodeReviewHelp">Help</a>
|
<a class="novisit" target="_blank" href="http://code.google.com/p/rietveld/issues/list">Bug tracker</a>
|
<a class="novisit" target="_blank" href="http://groups.google.com/group/codereview-discuss">Discussion group</a>
|
<a class="novisit" target="_blank" href="http://code.google.com/p/rietveld">Source code</a>
|
<a class="novisit" href="http://codereview.appspot.com/_ah/logout?continue=https://www.google.com/accounts/Logout%3Fcontinue%3Dhttps://appengine.google.com/_ah/logout%253Fcontinue%253Dhttp://codereview.appspot.com/4571045/%26service%3Dah">Sign out</a>
</div>
<div class="counter">(691)</div>
<div class="mainmenu">
<a href="/" class="active">Issues</a>
<a href="/repos">Repositories</a>
<a href="/search">Search</a>
</div>
<div class="mainmenu2">
<a href="/use_uploadpy">Create Issue</a>
|
<a href="/mine">My Issues</a>
|
<a href="/starred">Starred</a>
|
<a href="/all">Open</a>
|
<a href="/all?closed=1">All</a>
</div>
<div>
<h2>
<span id="issue-star-4571045">
<a href="javascript:M_addIssueStar(4571045)">
<img src="/static/star-dark.gif" width="15" height="15" border="0"></a>
</span>
<span class="issue-close" id="issue-close-4571045">
<a href="javascript:M_closeIssue(4571045)">
<img src="/static/close.gif" title="Close This Issue" width="15" height="15" border="0"></a>
</span>
Issue <a href="/4571045/" onmouseover="M_showPopUp(this, 'popup-issue');">
4571045</a>:
New matrix benchmarks to evaluate ::setConcat implementation options
</h2>
<table class="issue-details" border="0" width="100%">
<tbody><tr valign="top">
<td class="meta" width="20%">
<div>
<a class="novisit" href="/4571045/edit">
Edit Issue
</a>
<br>
<a class="novisit" href="/4571045/publish">
Publish+Mail Comments
</a> ('m')
<br>
<a class="novisit" href="/4571045/diff/1/bench/MatrixBench.cpp">
<b>Start Review</b>
</a>
</div>
<div class="issue_details_sidebar">
<div><b>Created:</b><br>
16 minutes ago by me
</div>
<div><b>Modified:</b><br>
0 minutes ago
</div>
<div><b>Reviewers:</b><br>
<a href="/user/reed1" onmouseover="M_showUserInfoPopup(this)">reed1</a>
</div>
<div><b>CC:</b><br>
</div>
<div><b>Base URL:</b><br>
http://skia.googlecode.com/svn/trunk/
</div>
<div><b>Visibility:</b><br>
Public.
</div>
</div>
</td>
<td style="padding-left: .8em; padding-right: .8em;" width="80%">
<h3><a id="issue-description-pointer" href="javascript:M_toggleSection('issue-description')" class="toggled-section opentriangle">
Description</a></h3>
<div id="issue-description" style="margin-left:15px;">
<pre>On platforms that use Float (instead of Fixed), SkMatrix stores its internal
values as floats, but setConcat() needs extra precision and so uses doubles to
contain intermediate values.
These three benchmarks compare the speed of float-only, double-only, and
float-cast-to-double implementations of a chunk of code extracted from the
non-perspective case of setConcat().
</pre>
</div>
<h3>
<a id="ps-1-pointer" href="javascript:M_toggleSectionForPS('4571045', '1')" class="toggled-section opentriangle">
Patch Set 1
</a>
</h3>
<div id="ps-1" style="">
<div class="issue-list">
<div class="pagination">
<div style="float: left;">
<i>Created:</i> 16 minutes ago
</div>
<div style="float: right;">
<a href="/download/issue4571045_1.diff">
Download raw patch set</a>
</div>
<div style="clear:both;"></div>
</div>
<table id="queues" style="clear:both;">
<tbody><tr align="left">
<th colspan="2"></th>
<th>Unified diffs</th>
<th>Side-by-side diffs</th>
<th>Delta from patch set</th>
<th colspan="3">Stats</th>
<th>Patch</th>
</tr>
<tr name="patch">
<td class="first" width="14"><img src="/static/closedtriangle.gif" style="" width="12" height="9"></td>
<td style="white-space: nowrap">M </td>
<td>
<a class="noul" href="/4571045/patch/1/2">
bench/MatrixBench.cpp
</a>
</td>
<td>
<a class="noul" href="/4571045/diff/1/bench/MatrixBench.cpp">
View
</a>
</td>
<td style="white-space: nowrap">
</td>
<td style="white-space: nowrap">4 chunks</td>
<td style="white-space: nowrap">+114 lines, -3 lines</td>
<td style="white-space: nowrap">
0 comments
</td>
<td>
<a href="/download/issue4571045_1_2.diff" title="Download patch for bench/MatrixBench.cpp">
Download
</a>
</td>
</tr>
</tbody></table>
</div>
</div>
<h3>
<a id="messages-pointer" href="javascript:M_toggleSection('messages')" class="toggled-section opentriangle">
Messages
</a>
</h3>
<div><i>Total messages: 3</i></div>
<div id="messages">
<div style="margin-bottom: .5em;">
<a href="javascript:M_showAllComments('cl', 3)">
Expand All Messages</a>
|
<a href="javascript:M_hideAllComments('cl', 3)">
Collapse All Messages</a>
</div>
<div class="message " id="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UY6QcM" name="0">
<a name="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UY6QcM"></a>
<div class="header">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tbody><tr class="comment_title" onclick="M_switchChangelistComment(0)">
<td style="padding-left: 5px; white-space: nowrap;">
<b>me</b>
</td>
<td width="100%">
<table style="table-layout:fixed; white-space: nowrap;" width="100%">
<tbody><tr>
<td>
<div style="white-space: nowrap; overflow: hidden;" class="extra" id="cl-preview-0">
</div>
</td>
</tr>
</tbody></table>
</td>
<td align="right" style="white-space: nowrap; padding-right: 5px;">
13 minutes ago
</td>
</tr>
</tbody></table>
</div>
<div id="cl-comment-0" style="display: none;">
<div class="message-body">
<pre name="cl-message-0"></pre>
</div>
<div class="message-actions">
<a href="javascript:M_replyToMessage('0', '2011/06/03 18:57:35', 'TomH')" id="message-reply-href-0">Reply</a>
<textarea rows="7" cols="70" name="message" style="display:none"></textarea>
<div id="message-reply-0" style="display:none;"></div>
</div>
</div>
</div>
<div class="message " id="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UY0Q8M" name="1">
<a name="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UY0Q8M"></a>
<div class="header">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tbody><tr class="comment_title" onclick="M_switchChangelistComment(1)">
<td style="padding-left: 5px; white-space: nowrap;">
<b>reed1</b>
</td>
<td width="100%">
<table style="table-layout:fixed; white-space: nowrap;" width="100%">
<tbody><tr>
<td>
<div style="white-space: nowrap; overflow: hidden;" class="extra" id="cl-preview-1">
1. lets remove the "fix" from the function name. just muladdmul I think 2. we ...
</div>
</td>
</tr>
</tbody></table>
</td>
<td align="right" style="white-space: nowrap; padding-right: 5px;">
10 minutes ago
</td>
</tr>
</tbody></table>
</div>
<div id="cl-comment-1" style="display: none;">
<div class="message-body">
<pre name="cl-message-1">1. lets remove the "fix" from the function name. just muladdmul I think
2. we can remove the return, since it will be compiled away anyway
3. nice checkin comment!
4. what are the results like?</pre>
</div>
<div class="message-actions">
<a href="javascript:M_replyToMessage('1', '2011/06/03 19:00:39', 'reed1')" id="message-reply-href-1">Reply</a>
<textarea rows="7" cols="70" name="message" style="display:none"></textarea>
<div id="message-reply-1" style="display:none;"></div>
</div>
</div>
</div>
<div class="message " id="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UYuRcM" name="2">
<a name="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UYuRcM"></a>
<div class="header">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tbody><tr class="comment_title" onclick="M_switchChangelistComment(2)">
<td style="padding-left: 5px; white-space: nowrap;">
<b>me</b>
</td>
<td width="100%">
<table style="table-layout:fixed; white-space: nowrap;" width="100%">
<tbody><tr>
<td>
<div style="white-space: nowrap; overflow: hidden; visibility: hidden;" class="extra" id="cl-preview-2">
> 4. what are the results like? For posterity: tomhudson@tomhudson-zx600-linux:/usr/local/google/src/skia3$ out/bench/bench -match matrix_concat -repeat 1000 ...
</div>
</td>
</tr>
</tbody></table>
</td>
<td align="right" style="white-space: nowrap; padding-right: 5px;">
0 minutes ago
</td>
</tr>
</tbody></table>
</div>
<div id="cl-comment-2">
<div class="message-body">
<pre name="cl-message-2">> 4. what are the results like?
For posterity:
tomhudson@tomhudson-zx600-linux:/usr/local/google/src/skia3$ out/bench/bench
-match matrix_concat -repeat 1000
skia bench: alpha=0xFF antialias=1 filter=0
running bench [640 480] matrix_concat_double 8888: msecs = 0.79 565:
msecs = 0.79 GPU: msecs = 0.79
running bench [640 480] matrix_concat_floatdouble 8888: msecs = 0.97 565:
msecs = 0.97 GPU: msecs = 0.97
running bench [640 480] matrix_concat_float 8888: msecs = 0.74 565:
msecs = 0.73 GPU: msecs = 0.74</pre>
</div>
<div class="message-actions">
<a href="javascript:M_replyToMessage('2', '2011/06/03 19:11:06', 'TomH')" id="message-reply-href-2">Reply</a>
<textarea rows="7" cols="70" name="message" style="display:none"></textarea>
<div id="message-reply-2" style="display:none;"></div>
</div>
</div>
</div>
<div>
<a href="javascript:M_showAllComments('cl', 3)">
Expand All Messages</a>
|
<a href="javascript:M_hideAllComments('cl', 3)">
Collapse All Messages</a>
</div>
</div>
<script language="JavaScript" type="text/javascript">
<!--
document.onkeydown = M_changelistKeyDown;
var dashboardState = new M_DashboardState(window, 'patch', 'M_CLPatchMarker');
M_switchChangelistCommentByAnchor();
// -->
</script>
<div style="display:none;">
<form method="POST" action="/4571045/publish" id="message-reply-form">
<input type="hidden" name="xsrf_token" value="dd5d1a57ca1d5440593050fdc596d377">
<div></div>
<input type="hidden" name="subject" value="New matrix benchmarks to evaluate ::setConcat implementation options">
<input type="hidden" name="message_only" value="1">
<input type="submit" value="Send Message">
<input type="button" value="Discard" name="discard">
<input type="checkbox" name="send_mail" value="1" id="message-reply-send-mail" checked="checked">
<label>Send mail to reviewers</label>
</form>
</div>
<a id="resizer" class="resizer" style="display:none;cursor:pointer">
<img src="/static/zippyplus.gif">
</a>
</td>
</tr>
</tbody></table>
</div>
<div class="popup" id="popup-issue" style="left: 104px; top: 116px; visibility: hidden; ">
<b>Issue 4571045: New matrix benchmarks to evaluate ::setConcat implementation options
</b><br>
Created 16 minutes ago by me<br>
Modified 0 minutes ago<br>
Reviewers: reed1<br>
Base URL: http://skia.googlecode.com/svn/trunk/<br>
Comments: 0
</div>
<p></p>
<div style="float: left;">
<a target="_blank" href="http://code.google.com/appengine/"><img border="0" src="/static/appengine-noborder-120x30.gif" alt="Powered by Google App Engine"></a>
</div>
<div class="extra" style="font-size: 9pt; float: right; text-align: right;">
<div style="height:14px;">
<img src="/static/rss.gif" alt="RSS Feeds" width="14" height="14" align="top">
<a href="/rss/all">Recent Issues</a>
|
<a href="/rss/mine/TomH">My Issues</a>
|
<a href="/rss/reviews/TomH">My Reviews</a>
|
<a href="/rss/closed/TomH">My Closed</a>
|
<a href="/rss/issue/4571045">This issue</a>
</div>
<div style="margin-top: .3em;">This is Rietveld <a href="http://code.google.com/p/rietveld/updates/list">r756
</a></div>
</div>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script><script src="http://www.google-analytics.com/ga.js" type="text/javascript"></script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-4803694-4");
pageTracker._initData();
pageTracker._trackPageview();
</script>
On platforms that use Float (instead of Fixed), SkMatrix stores its internal
values as floats, but setConcat() needs extra precision and so uses doubles
to contain intermediate values.
These three benchmarks compare the speed of float-only, double-only, and
float-cast-to-double implementations of a chunk of code extracted from the
non-perspective case of setConcat().
git-svn-id: http://skia.googlecode.com/svn/trunk@1497 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-06-03 19:16:56 +00:00
|
|
|
}
|
|
|
|
private:
|
2011-06-03 20:32:58 +00:00
|
|
|
float mya [9];
|
|
|
|
float myb [9];
|
|
|
|
float myr [9];
|
<body onunload="M_unloadPage();">
<!-- Begin help window -->
<script type="text/javascript"><!--
var xsrfToken = 'dd5d1a57ca1d5440593050fdc596d377';
var helpDisplayed = false;
document.onclick = M_clickCommon;
var media_url = "/static/";
var base_url = "/";
var publish_link = "/4571045/publish";
// -->
</script>
<div id="help" style="display: none;">
<div style="font-size: medium; text-align: center;">Keyboard Shortcuts</div>
<hr>
<table width="100%">
<tbody><tr valign="top">
<td>
<table width="100%">
<tbody><tr>
<td></td><th>File</th>
</tr>
<tr>
<td class="shortcut"><span class="letter">u</span> <b>:</b></td><td>up to issue</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">m</span> <b>:</b></td><td>publish + mail comments</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">M</span> <b>:</b></td><td>edit review message</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">j</span> / <span class="letter">k</span> <b>:</b></td><td>jump to file after / before current file</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">J</span> / <span class="letter">K</span> <b>:</b></td><td>jump to next file with a comment after / before current file</td>
</tr>
<tr>
<td></td><th>Side-by-side diff</th>
</tr>
<tr>
<td class="shortcut"><span class="letter">i</span> <b>:</b></td><td>toggle intra-line diffs</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">e</span> <b>:</b></td><td>expand all comments</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">c</span> <b>:</b></td><td>collapse all comments</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">s</span> <b>:</b></td><td>toggle showing all comments</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">n</span> / <span class="letter">p</span> <b>:</b></td><td>next / previous diff chunk or comment</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">N</span> / <span class="letter">P</span> <b>:</b></td><td>next / previous comment</td>
</tr>
<tr>
<td class="shortcut"><span class="letter"><Enter></span> <b>:</b></td><td>respond to / edit current comment</td>
</tr>
</tbody></table>
</td>
<td>
<table width="100%">
<tbody><tr>
<td></td><th>Issue</th>
</tr>
<tr>
<td class="shortcut"><span class="letter">u</span> <b>:</b></td><td>up to list of issues</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">m</span> <b>:</b></td><td>publish + mail comments</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">j</span> / <span class="letter">k</span> <b>:</b></td><td>jump to patch after / before current patch</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">o</span> / <span class="letter"><Enter></span> <b>:</b></td><td>open current patch in side-by-side view</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">i</span> <b>:</b></td><td>open current patch in unified diff view</td>
</tr>
<tr><td> </td></tr>
<tr><td></td><th>Issue List</th></tr>
<tr>
<td class="shortcut"><span class="letter">j</span> / <span class="letter">k</span> <b>:</b></td><td>jump to issue after / before current issue</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">o</span> / <span class="letter"><Enter></span> <b>:</b></td><td>open current issue</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">#</span> <b>:</b></td>
<td>close issue</td>
</tr>
<tr><td> </td></tr>
<tr>
<td></td><th>Comment/message editing</th>
</tr>
<tr>
<td class="shortcut"><span class="letter"><Ctrl></span> + <span class="letter">s</span> <b>:</b></td><td>save comment</td>
</tr>
<tr>
<td class="shortcut"><span class="letter"><Esc></span> <b>:</b></td><td>cancel edit</td>
</tr>
</tbody></table>
</td>
</tr>
</tbody></table>
</div>
<!-- End help window -->
<div align="right">
<div style="float:left; font-weight:bold"><i>Rietveld</i> Code Review Tool</div>
<b>tomhudson@google.com (TomH)</b>
|
<a class="novisit" href="/settings">Settings</a>
|
<a class="novisit" target="_blank" href="http://code.google.com/p/rietveld/wiki/CodeReviewHelp">Help</a>
|
<a class="novisit" target="_blank" href="http://code.google.com/p/rietveld/issues/list">Bug tracker</a>
|
<a class="novisit" target="_blank" href="http://groups.google.com/group/codereview-discuss">Discussion group</a>
|
<a class="novisit" target="_blank" href="http://code.google.com/p/rietveld">Source code</a>
|
<a class="novisit" href="http://codereview.appspot.com/_ah/logout?continue=https://www.google.com/accounts/Logout%3Fcontinue%3Dhttps://appengine.google.com/_ah/logout%253Fcontinue%253Dhttp://codereview.appspot.com/4571045/%26service%3Dah">Sign out</a>
</div>
<div class="counter">(691)</div>
<div class="mainmenu">
<a href="/" class="active">Issues</a>
<a href="/repos">Repositories</a>
<a href="/search">Search</a>
</div>
<div class="mainmenu2">
<a href="/use_uploadpy">Create Issue</a>
|
<a href="/mine">My Issues</a>
|
<a href="/starred">Starred</a>
|
<a href="/all">Open</a>
|
<a href="/all?closed=1">All</a>
</div>
<div>
<h2>
<span id="issue-star-4571045">
<a href="javascript:M_addIssueStar(4571045)">
<img src="/static/star-dark.gif" width="15" height="15" border="0"></a>
</span>
<span class="issue-close" id="issue-close-4571045">
<a href="javascript:M_closeIssue(4571045)">
<img src="/static/close.gif" title="Close This Issue" width="15" height="15" border="0"></a>
</span>
Issue <a href="/4571045/" onmouseover="M_showPopUp(this, 'popup-issue');">
4571045</a>:
New matrix benchmarks to evaluate ::setConcat implementation options
</h2>
<table class="issue-details" border="0" width="100%">
<tbody><tr valign="top">
<td class="meta" width="20%">
<div>
<a class="novisit" href="/4571045/edit">
Edit Issue
</a>
<br>
<a class="novisit" href="/4571045/publish">
Publish+Mail Comments
</a> ('m')
<br>
<a class="novisit" href="/4571045/diff/1/bench/MatrixBench.cpp">
<b>Start Review</b>
</a>
</div>
<div class="issue_details_sidebar">
<div><b>Created:</b><br>
16 minutes ago by me
</div>
<div><b>Modified:</b><br>
0 minutes ago
</div>
<div><b>Reviewers:</b><br>
<a href="/user/reed1" onmouseover="M_showUserInfoPopup(this)">reed1</a>
</div>
<div><b>CC:</b><br>
</div>
<div><b>Base URL:</b><br>
http://skia.googlecode.com/svn/trunk/
</div>
<div><b>Visibility:</b><br>
Public.
</div>
</div>
</td>
<td style="padding-left: .8em; padding-right: .8em;" width="80%">
<h3><a id="issue-description-pointer" href="javascript:M_toggleSection('issue-description')" class="toggled-section opentriangle">
Description</a></h3>
<div id="issue-description" style="margin-left:15px;">
<pre>On platforms that use Float (instead of Fixed), SkMatrix stores its internal
values as floats, but setConcat() needs extra precision and so uses doubles to
contain intermediate values.
These three benchmarks compare the speed of float-only, double-only, and
float-cast-to-double implementations of a chunk of code extracted from the
non-perspective case of setConcat().
</pre>
</div>
<h3>
<a id="ps-1-pointer" href="javascript:M_toggleSectionForPS('4571045', '1')" class="toggled-section opentriangle">
Patch Set 1
</a>
</h3>
<div id="ps-1" style="">
<div class="issue-list">
<div class="pagination">
<div style="float: left;">
<i>Created:</i> 16 minutes ago
</div>
<div style="float: right;">
<a href="/download/issue4571045_1.diff">
Download raw patch set</a>
</div>
<div style="clear:both;"></div>
</div>
<table id="queues" style="clear:both;">
<tbody><tr align="left">
<th colspan="2"></th>
<th>Unified diffs</th>
<th>Side-by-side diffs</th>
<th>Delta from patch set</th>
<th colspan="3">Stats</th>
<th>Patch</th>
</tr>
<tr name="patch">
<td class="first" width="14"><img src="/static/closedtriangle.gif" style="" width="12" height="9"></td>
<td style="white-space: nowrap">M </td>
<td>
<a class="noul" href="/4571045/patch/1/2">
bench/MatrixBench.cpp
</a>
</td>
<td>
<a class="noul" href="/4571045/diff/1/bench/MatrixBench.cpp">
View
</a>
</td>
<td style="white-space: nowrap">
</td>
<td style="white-space: nowrap">4 chunks</td>
<td style="white-space: nowrap">+114 lines, -3 lines</td>
<td style="white-space: nowrap">
0 comments
</td>
<td>
<a href="/download/issue4571045_1_2.diff" title="Download patch for bench/MatrixBench.cpp">
Download
</a>
</td>
</tr>
</tbody></table>
</div>
</div>
<h3>
<a id="messages-pointer" href="javascript:M_toggleSection('messages')" class="toggled-section opentriangle">
Messages
</a>
</h3>
<div><i>Total messages: 3</i></div>
<div id="messages">
<div style="margin-bottom: .5em;">
<a href="javascript:M_showAllComments('cl', 3)">
Expand All Messages</a>
|
<a href="javascript:M_hideAllComments('cl', 3)">
Collapse All Messages</a>
</div>
<div class="message " id="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UY6QcM" name="0">
<a name="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UY6QcM"></a>
<div class="header">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tbody><tr class="comment_title" onclick="M_switchChangelistComment(0)">
<td style="padding-left: 5px; white-space: nowrap;">
<b>me</b>
</td>
<td width="100%">
<table style="table-layout:fixed; white-space: nowrap;" width="100%">
<tbody><tr>
<td>
<div style="white-space: nowrap; overflow: hidden;" class="extra" id="cl-preview-0">
</div>
</td>
</tr>
</tbody></table>
</td>
<td align="right" style="white-space: nowrap; padding-right: 5px;">
13 minutes ago
</td>
</tr>
</tbody></table>
</div>
<div id="cl-comment-0" style="display: none;">
<div class="message-body">
<pre name="cl-message-0"></pre>
</div>
<div class="message-actions">
<a href="javascript:M_replyToMessage('0', '2011/06/03 18:57:35', 'TomH')" id="message-reply-href-0">Reply</a>
<textarea rows="7" cols="70" name="message" style="display:none"></textarea>
<div id="message-reply-0" style="display:none;"></div>
</div>
</div>
</div>
<div class="message " id="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UY0Q8M" name="1">
<a name="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UY0Q8M"></a>
<div class="header">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tbody><tr class="comment_title" onclick="M_switchChangelistComment(1)">
<td style="padding-left: 5px; white-space: nowrap;">
<b>reed1</b>
</td>
<td width="100%">
<table style="table-layout:fixed; white-space: nowrap;" width="100%">
<tbody><tr>
<td>
<div style="white-space: nowrap; overflow: hidden;" class="extra" id="cl-preview-1">
1. lets remove the "fix" from the function name. just muladdmul I think 2. we ...
</div>
</td>
</tr>
</tbody></table>
</td>
<td align="right" style="white-space: nowrap; padding-right: 5px;">
10 minutes ago
</td>
</tr>
</tbody></table>
</div>
<div id="cl-comment-1" style="display: none;">
<div class="message-body">
<pre name="cl-message-1">1. lets remove the "fix" from the function name. just muladdmul I think
2. we can remove the return, since it will be compiled away anyway
3. nice checkin comment!
4. what are the results like?</pre>
</div>
<div class="message-actions">
<a href="javascript:M_replyToMessage('1', '2011/06/03 19:00:39', 'reed1')" id="message-reply-href-1">Reply</a>
<textarea rows="7" cols="70" name="message" style="display:none"></textarea>
<div id="message-reply-1" style="display:none;"></div>
</div>
</div>
</div>
<div class="message " id="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UYuRcM" name="2">
<a name="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UYuRcM"></a>
<div class="header">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tbody><tr class="comment_title" onclick="M_switchChangelistComment(2)">
<td style="padding-left: 5px; white-space: nowrap;">
<b>me</b>
</td>
<td width="100%">
<table style="table-layout:fixed; white-space: nowrap;" width="100%">
<tbody><tr>
<td>
<div style="white-space: nowrap; overflow: hidden; visibility: hidden;" class="extra" id="cl-preview-2">
> 4. what are the results like? For posterity: tomhudson@tomhudson-zx600-linux:/usr/local/google/src/skia3$ out/bench/bench -match matrix_concat -repeat 1000 ...
</div>
</td>
</tr>
</tbody></table>
</td>
<td align="right" style="white-space: nowrap; padding-right: 5px;">
0 minutes ago
</td>
</tr>
</tbody></table>
</div>
<div id="cl-comment-2">
<div class="message-body">
<pre name="cl-message-2">> 4. what are the results like?
For posterity:
tomhudson@tomhudson-zx600-linux:/usr/local/google/src/skia3$ out/bench/bench
-match matrix_concat -repeat 1000
skia bench: alpha=0xFF antialias=1 filter=0
running bench [640 480] matrix_concat_double 8888: msecs = 0.79 565:
msecs = 0.79 GPU: msecs = 0.79
running bench [640 480] matrix_concat_floatdouble 8888: msecs = 0.97 565:
msecs = 0.97 GPU: msecs = 0.97
running bench [640 480] matrix_concat_float 8888: msecs = 0.74 565:
msecs = 0.73 GPU: msecs = 0.74</pre>
</div>
<div class="message-actions">
<a href="javascript:M_replyToMessage('2', '2011/06/03 19:11:06', 'TomH')" id="message-reply-href-2">Reply</a>
<textarea rows="7" cols="70" name="message" style="display:none"></textarea>
<div id="message-reply-2" style="display:none;"></div>
</div>
</div>
</div>
<div>
<a href="javascript:M_showAllComments('cl', 3)">
Expand All Messages</a>
|
<a href="javascript:M_hideAllComments('cl', 3)">
Collapse All Messages</a>
</div>
</div>
<script language="JavaScript" type="text/javascript">
<!--
document.onkeydown = M_changelistKeyDown;
var dashboardState = new M_DashboardState(window, 'patch', 'M_CLPatchMarker');
M_switchChangelistCommentByAnchor();
// -->
</script>
<div style="display:none;">
<form method="POST" action="/4571045/publish" id="message-reply-form">
<input type="hidden" name="xsrf_token" value="dd5d1a57ca1d5440593050fdc596d377">
<div></div>
<input type="hidden" name="subject" value="New matrix benchmarks to evaluate ::setConcat implementation options">
<input type="hidden" name="message_only" value="1">
<input type="submit" value="Send Message">
<input type="button" value="Discard" name="discard">
<input type="checkbox" name="send_mail" value="1" id="message-reply-send-mail" checked="checked">
<label>Send mail to reviewers</label>
</form>
</div>
<a id="resizer" class="resizer" style="display:none;cursor:pointer">
<img src="/static/zippyplus.gif">
</a>
</td>
</tr>
</tbody></table>
</div>
<div class="popup" id="popup-issue" style="left: 104px; top: 116px; visibility: hidden; ">
<b>Issue 4571045: New matrix benchmarks to evaluate ::setConcat implementation options
</b><br>
Created 16 minutes ago by me<br>
Modified 0 minutes ago<br>
Reviewers: reed1<br>
Base URL: http://skia.googlecode.com/svn/trunk/<br>
Comments: 0
</div>
<p></p>
<div style="float: left;">
<a target="_blank" href="http://code.google.com/appengine/"><img border="0" src="/static/appengine-noborder-120x30.gif" alt="Powered by Google App Engine"></a>
</div>
<div class="extra" style="font-size: 9pt; float: right; text-align: right;">
<div style="height:14px;">
<img src="/static/rss.gif" alt="RSS Feeds" width="14" height="14" align="top">
<a href="/rss/all">Recent Issues</a>
|
<a href="/rss/mine/TomH">My Issues</a>
|
<a href="/rss/reviews/TomH">My Reviews</a>
|
<a href="/rss/closed/TomH">My Closed</a>
|
<a href="/rss/issue/4571045">This issue</a>
</div>
<div style="margin-top: .3em;">This is Rietveld <a href="http://code.google.com/p/rietveld/updates/list">r756
</a></div>
</div>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script><script src="http://www.google-analytics.com/ga.js" type="text/javascript"></script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-4803694-4");
pageTracker._initData();
pageTracker._trackPageview();
</script>
On platforms that use Float (instead of Fixed), SkMatrix stores its internal
values as floats, but setConcat() needs extra precision and so uses doubles
to contain intermediate values.
These three benchmarks compare the speed of float-only, double-only, and
float-cast-to-double implementations of a chunk of code extracted from the
non-perspective case of setConcat().
git-svn-id: http://skia.googlecode.com/svn/trunk@1497 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-06-03 19:16:56 +00:00
|
|
|
typedef MatrixBench INHERITED;
|
|
|
|
};
|
|
|
|
|
|
|
|
// Test the performance of setConcat() non-perspective case:
|
|
|
|
// using double precision only.
|
|
|
|
class DoubleConcatMatrixBench : public MatrixBench {
|
|
|
|
public:
|
2011-06-06 13:20:29 +00:00
|
|
|
DoubleConcatMatrixBench(void* p) : INHERITED(p, "concat_double") {
|
|
|
|
init9(mya);
|
|
|
|
init9(myb);
|
|
|
|
init9(myr);
|
<body onunload="M_unloadPage();">
<!-- Begin help window -->
<script type="text/javascript"><!--
var xsrfToken = 'dd5d1a57ca1d5440593050fdc596d377';
var helpDisplayed = false;
document.onclick = M_clickCommon;
var media_url = "/static/";
var base_url = "/";
var publish_link = "/4571045/publish";
// -->
</script>
<div id="help" style="display: none;">
<div style="font-size: medium; text-align: center;">Keyboard Shortcuts</div>
<hr>
<table width="100%">
<tbody><tr valign="top">
<td>
<table width="100%">
<tbody><tr>
<td></td><th>File</th>
</tr>
<tr>
<td class="shortcut"><span class="letter">u</span> <b>:</b></td><td>up to issue</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">m</span> <b>:</b></td><td>publish + mail comments</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">M</span> <b>:</b></td><td>edit review message</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">j</span> / <span class="letter">k</span> <b>:</b></td><td>jump to file after / before current file</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">J</span> / <span class="letter">K</span> <b>:</b></td><td>jump to next file with a comment after / before current file</td>
</tr>
<tr>
<td></td><th>Side-by-side diff</th>
</tr>
<tr>
<td class="shortcut"><span class="letter">i</span> <b>:</b></td><td>toggle intra-line diffs</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">e</span> <b>:</b></td><td>expand all comments</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">c</span> <b>:</b></td><td>collapse all comments</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">s</span> <b>:</b></td><td>toggle showing all comments</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">n</span> / <span class="letter">p</span> <b>:</b></td><td>next / previous diff chunk or comment</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">N</span> / <span class="letter">P</span> <b>:</b></td><td>next / previous comment</td>
</tr>
<tr>
<td class="shortcut"><span class="letter"><Enter></span> <b>:</b></td><td>respond to / edit current comment</td>
</tr>
</tbody></table>
</td>
<td>
<table width="100%">
<tbody><tr>
<td></td><th>Issue</th>
</tr>
<tr>
<td class="shortcut"><span class="letter">u</span> <b>:</b></td><td>up to list of issues</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">m</span> <b>:</b></td><td>publish + mail comments</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">j</span> / <span class="letter">k</span> <b>:</b></td><td>jump to patch after / before current patch</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">o</span> / <span class="letter"><Enter></span> <b>:</b></td><td>open current patch in side-by-side view</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">i</span> <b>:</b></td><td>open current patch in unified diff view</td>
</tr>
<tr><td> </td></tr>
<tr><td></td><th>Issue List</th></tr>
<tr>
<td class="shortcut"><span class="letter">j</span> / <span class="letter">k</span> <b>:</b></td><td>jump to issue after / before current issue</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">o</span> / <span class="letter"><Enter></span> <b>:</b></td><td>open current issue</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">#</span> <b>:</b></td>
<td>close issue</td>
</tr>
<tr><td> </td></tr>
<tr>
<td></td><th>Comment/message editing</th>
</tr>
<tr>
<td class="shortcut"><span class="letter"><Ctrl></span> + <span class="letter">s</span> <b>:</b></td><td>save comment</td>
</tr>
<tr>
<td class="shortcut"><span class="letter"><Esc></span> <b>:</b></td><td>cancel edit</td>
</tr>
</tbody></table>
</td>
</tr>
</tbody></table>
</div>
<!-- End help window -->
<div align="right">
<div style="float:left; font-weight:bold"><i>Rietveld</i> Code Review Tool</div>
<b>tomhudson@google.com (TomH)</b>
|
<a class="novisit" href="/settings">Settings</a>
|
<a class="novisit" target="_blank" href="http://code.google.com/p/rietveld/wiki/CodeReviewHelp">Help</a>
|
<a class="novisit" target="_blank" href="http://code.google.com/p/rietveld/issues/list">Bug tracker</a>
|
<a class="novisit" target="_blank" href="http://groups.google.com/group/codereview-discuss">Discussion group</a>
|
<a class="novisit" target="_blank" href="http://code.google.com/p/rietveld">Source code</a>
|
<a class="novisit" href="http://codereview.appspot.com/_ah/logout?continue=https://www.google.com/accounts/Logout%3Fcontinue%3Dhttps://appengine.google.com/_ah/logout%253Fcontinue%253Dhttp://codereview.appspot.com/4571045/%26service%3Dah">Sign out</a>
</div>
<div class="counter">(691)</div>
<div class="mainmenu">
<a href="/" class="active">Issues</a>
<a href="/repos">Repositories</a>
<a href="/search">Search</a>
</div>
<div class="mainmenu2">
<a href="/use_uploadpy">Create Issue</a>
|
<a href="/mine">My Issues</a>
|
<a href="/starred">Starred</a>
|
<a href="/all">Open</a>
|
<a href="/all?closed=1">All</a>
</div>
<div>
<h2>
<span id="issue-star-4571045">
<a href="javascript:M_addIssueStar(4571045)">
<img src="/static/star-dark.gif" width="15" height="15" border="0"></a>
</span>
<span class="issue-close" id="issue-close-4571045">
<a href="javascript:M_closeIssue(4571045)">
<img src="/static/close.gif" title="Close This Issue" width="15" height="15" border="0"></a>
</span>
Issue <a href="/4571045/" onmouseover="M_showPopUp(this, 'popup-issue');">
4571045</a>:
New matrix benchmarks to evaluate ::setConcat implementation options
</h2>
<table class="issue-details" border="0" width="100%">
<tbody><tr valign="top">
<td class="meta" width="20%">
<div>
<a class="novisit" href="/4571045/edit">
Edit Issue
</a>
<br>
<a class="novisit" href="/4571045/publish">
Publish+Mail Comments
</a> ('m')
<br>
<a class="novisit" href="/4571045/diff/1/bench/MatrixBench.cpp">
<b>Start Review</b>
</a>
</div>
<div class="issue_details_sidebar">
<div><b>Created:</b><br>
16 minutes ago by me
</div>
<div><b>Modified:</b><br>
0 minutes ago
</div>
<div><b>Reviewers:</b><br>
<a href="/user/reed1" onmouseover="M_showUserInfoPopup(this)">reed1</a>
</div>
<div><b>CC:</b><br>
</div>
<div><b>Base URL:</b><br>
http://skia.googlecode.com/svn/trunk/
</div>
<div><b>Visibility:</b><br>
Public.
</div>
</div>
</td>
<td style="padding-left: .8em; padding-right: .8em;" width="80%">
<h3><a id="issue-description-pointer" href="javascript:M_toggleSection('issue-description')" class="toggled-section opentriangle">
Description</a></h3>
<div id="issue-description" style="margin-left:15px;">
<pre>On platforms that use Float (instead of Fixed), SkMatrix stores its internal
values as floats, but setConcat() needs extra precision and so uses doubles to
contain intermediate values.
These three benchmarks compare the speed of float-only, double-only, and
float-cast-to-double implementations of a chunk of code extracted from the
non-perspective case of setConcat().
</pre>
</div>
<h3>
<a id="ps-1-pointer" href="javascript:M_toggleSectionForPS('4571045', '1')" class="toggled-section opentriangle">
Patch Set 1
</a>
</h3>
<div id="ps-1" style="">
<div class="issue-list">
<div class="pagination">
<div style="float: left;">
<i>Created:</i> 16 minutes ago
</div>
<div style="float: right;">
<a href="/download/issue4571045_1.diff">
Download raw patch set</a>
</div>
<div style="clear:both;"></div>
</div>
<table id="queues" style="clear:both;">
<tbody><tr align="left">
<th colspan="2"></th>
<th>Unified diffs</th>
<th>Side-by-side diffs</th>
<th>Delta from patch set</th>
<th colspan="3">Stats</th>
<th>Patch</th>
</tr>
<tr name="patch">
<td class="first" width="14"><img src="/static/closedtriangle.gif" style="" width="12" height="9"></td>
<td style="white-space: nowrap">M </td>
<td>
<a class="noul" href="/4571045/patch/1/2">
bench/MatrixBench.cpp
</a>
</td>
<td>
<a class="noul" href="/4571045/diff/1/bench/MatrixBench.cpp">
View
</a>
</td>
<td style="white-space: nowrap">
</td>
<td style="white-space: nowrap">4 chunks</td>
<td style="white-space: nowrap">+114 lines, -3 lines</td>
<td style="white-space: nowrap">
0 comments
</td>
<td>
<a href="/download/issue4571045_1_2.diff" title="Download patch for bench/MatrixBench.cpp">
Download
</a>
</td>
</tr>
</tbody></table>
</div>
</div>
<h3>
<a id="messages-pointer" href="javascript:M_toggleSection('messages')" class="toggled-section opentriangle">
Messages
</a>
</h3>
<div><i>Total messages: 3</i></div>
<div id="messages">
<div style="margin-bottom: .5em;">
<a href="javascript:M_showAllComments('cl', 3)">
Expand All Messages</a>
|
<a href="javascript:M_hideAllComments('cl', 3)">
Collapse All Messages</a>
</div>
<div class="message " id="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UY6QcM" name="0">
<a name="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UY6QcM"></a>
<div class="header">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tbody><tr class="comment_title" onclick="M_switchChangelistComment(0)">
<td style="padding-left: 5px; white-space: nowrap;">
<b>me</b>
</td>
<td width="100%">
<table style="table-layout:fixed; white-space: nowrap;" width="100%">
<tbody><tr>
<td>
<div style="white-space: nowrap; overflow: hidden;" class="extra" id="cl-preview-0">
</div>
</td>
</tr>
</tbody></table>
</td>
<td align="right" style="white-space: nowrap; padding-right: 5px;">
13 minutes ago
</td>
</tr>
</tbody></table>
</div>
<div id="cl-comment-0" style="display: none;">
<div class="message-body">
<pre name="cl-message-0"></pre>
</div>
<div class="message-actions">
<a href="javascript:M_replyToMessage('0', '2011/06/03 18:57:35', 'TomH')" id="message-reply-href-0">Reply</a>
<textarea rows="7" cols="70" name="message" style="display:none"></textarea>
<div id="message-reply-0" style="display:none;"></div>
</div>
</div>
</div>
<div class="message " id="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UY0Q8M" name="1">
<a name="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UY0Q8M"></a>
<div class="header">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tbody><tr class="comment_title" onclick="M_switchChangelistComment(1)">
<td style="padding-left: 5px; white-space: nowrap;">
<b>reed1</b>
</td>
<td width="100%">
<table style="table-layout:fixed; white-space: nowrap;" width="100%">
<tbody><tr>
<td>
<div style="white-space: nowrap; overflow: hidden;" class="extra" id="cl-preview-1">
1. lets remove the "fix" from the function name. just muladdmul I think 2. we ...
</div>
</td>
</tr>
</tbody></table>
</td>
<td align="right" style="white-space: nowrap; padding-right: 5px;">
10 minutes ago
</td>
</tr>
</tbody></table>
</div>
<div id="cl-comment-1" style="display: none;">
<div class="message-body">
<pre name="cl-message-1">1. lets remove the "fix" from the function name. just muladdmul I think
2. we can remove the return, since it will be compiled away anyway
3. nice checkin comment!
4. what are the results like?</pre>
</div>
<div class="message-actions">
<a href="javascript:M_replyToMessage('1', '2011/06/03 19:00:39', 'reed1')" id="message-reply-href-1">Reply</a>
<textarea rows="7" cols="70" name="message" style="display:none"></textarea>
<div id="message-reply-1" style="display:none;"></div>
</div>
</div>
</div>
<div class="message " id="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UYuRcM" name="2">
<a name="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UYuRcM"></a>
<div class="header">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tbody><tr class="comment_title" onclick="M_switchChangelistComment(2)">
<td style="padding-left: 5px; white-space: nowrap;">
<b>me</b>
</td>
<td width="100%">
<table style="table-layout:fixed; white-space: nowrap;" width="100%">
<tbody><tr>
<td>
<div style="white-space: nowrap; overflow: hidden; visibility: hidden;" class="extra" id="cl-preview-2">
> 4. what are the results like? For posterity: tomhudson@tomhudson-zx600-linux:/usr/local/google/src/skia3$ out/bench/bench -match matrix_concat -repeat 1000 ...
</div>
</td>
</tr>
</tbody></table>
</td>
<td align="right" style="white-space: nowrap; padding-right: 5px;">
0 minutes ago
</td>
</tr>
</tbody></table>
</div>
<div id="cl-comment-2">
<div class="message-body">
<pre name="cl-message-2">> 4. what are the results like?
For posterity:
tomhudson@tomhudson-zx600-linux:/usr/local/google/src/skia3$ out/bench/bench
-match matrix_concat -repeat 1000
skia bench: alpha=0xFF antialias=1 filter=0
running bench [640 480] matrix_concat_double 8888: msecs = 0.79 565:
msecs = 0.79 GPU: msecs = 0.79
running bench [640 480] matrix_concat_floatdouble 8888: msecs = 0.97 565:
msecs = 0.97 GPU: msecs = 0.97
running bench [640 480] matrix_concat_float 8888: msecs = 0.74 565:
msecs = 0.73 GPU: msecs = 0.74</pre>
</div>
<div class="message-actions">
<a href="javascript:M_replyToMessage('2', '2011/06/03 19:11:06', 'TomH')" id="message-reply-href-2">Reply</a>
<textarea rows="7" cols="70" name="message" style="display:none"></textarea>
<div id="message-reply-2" style="display:none;"></div>
</div>
</div>
</div>
<div>
<a href="javascript:M_showAllComments('cl', 3)">
Expand All Messages</a>
|
<a href="javascript:M_hideAllComments('cl', 3)">
Collapse All Messages</a>
</div>
</div>
<script language="JavaScript" type="text/javascript">
<!--
document.onkeydown = M_changelistKeyDown;
var dashboardState = new M_DashboardState(window, 'patch', 'M_CLPatchMarker');
M_switchChangelistCommentByAnchor();
// -->
</script>
<div style="display:none;">
<form method="POST" action="/4571045/publish" id="message-reply-form">
<input type="hidden" name="xsrf_token" value="dd5d1a57ca1d5440593050fdc596d377">
<div></div>
<input type="hidden" name="subject" value="New matrix benchmarks to evaluate ::setConcat implementation options">
<input type="hidden" name="message_only" value="1">
<input type="submit" value="Send Message">
<input type="button" value="Discard" name="discard">
<input type="checkbox" name="send_mail" value="1" id="message-reply-send-mail" checked="checked">
<label>Send mail to reviewers</label>
</form>
</div>
<a id="resizer" class="resizer" style="display:none;cursor:pointer">
<img src="/static/zippyplus.gif">
</a>
</td>
</tr>
</tbody></table>
</div>
<div class="popup" id="popup-issue" style="left: 104px; top: 116px; visibility: hidden; ">
<b>Issue 4571045: New matrix benchmarks to evaluate ::setConcat implementation options
</b><br>
Created 16 minutes ago by me<br>
Modified 0 minutes ago<br>
Reviewers: reed1<br>
Base URL: http://skia.googlecode.com/svn/trunk/<br>
Comments: 0
</div>
<p></p>
<div style="float: left;">
<a target="_blank" href="http://code.google.com/appengine/"><img border="0" src="/static/appengine-noborder-120x30.gif" alt="Powered by Google App Engine"></a>
</div>
<div class="extra" style="font-size: 9pt; float: right; text-align: right;">
<div style="height:14px;">
<img src="/static/rss.gif" alt="RSS Feeds" width="14" height="14" align="top">
<a href="/rss/all">Recent Issues</a>
|
<a href="/rss/mine/TomH">My Issues</a>
|
<a href="/rss/reviews/TomH">My Reviews</a>
|
<a href="/rss/closed/TomH">My Closed</a>
|
<a href="/rss/issue/4571045">This issue</a>
</div>
<div style="margin-top: .3em;">This is Rietveld <a href="http://code.google.com/p/rietveld/updates/list">r756
</a></div>
</div>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script><script src="http://www.google-analytics.com/ga.js" type="text/javascript"></script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-4803694-4");
pageTracker._initData();
pageTracker._trackPageview();
</script>
On platforms that use Float (instead of Fixed), SkMatrix stores its internal
values as floats, but setConcat() needs extra precision and so uses doubles
to contain intermediate values.
These three benchmarks compare the speed of float-only, double-only, and
float-cast-to-double implementations of a chunk of code extracted from the
non-perspective case of setConcat().
git-svn-id: http://skia.googlecode.com/svn/trunk@1497 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-06-03 19:16:56 +00:00
|
|
|
}
|
|
|
|
protected:
|
2011-06-06 13:31:30 +00:00
|
|
|
virtual int mulLoopCount() const { return 4; }
|
|
|
|
|
<body onunload="M_unloadPage();">
<!-- Begin help window -->
<script type="text/javascript"><!--
var xsrfToken = 'dd5d1a57ca1d5440593050fdc596d377';
var helpDisplayed = false;
document.onclick = M_clickCommon;
var media_url = "/static/";
var base_url = "/";
var publish_link = "/4571045/publish";
// -->
</script>
<div id="help" style="display: none;">
<div style="font-size: medium; text-align: center;">Keyboard Shortcuts</div>
<hr>
<table width="100%">
<tbody><tr valign="top">
<td>
<table width="100%">
<tbody><tr>
<td></td><th>File</th>
</tr>
<tr>
<td class="shortcut"><span class="letter">u</span> <b>:</b></td><td>up to issue</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">m</span> <b>:</b></td><td>publish + mail comments</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">M</span> <b>:</b></td><td>edit review message</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">j</span> / <span class="letter">k</span> <b>:</b></td><td>jump to file after / before current file</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">J</span> / <span class="letter">K</span> <b>:</b></td><td>jump to next file with a comment after / before current file</td>
</tr>
<tr>
<td></td><th>Side-by-side diff</th>
</tr>
<tr>
<td class="shortcut"><span class="letter">i</span> <b>:</b></td><td>toggle intra-line diffs</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">e</span> <b>:</b></td><td>expand all comments</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">c</span> <b>:</b></td><td>collapse all comments</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">s</span> <b>:</b></td><td>toggle showing all comments</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">n</span> / <span class="letter">p</span> <b>:</b></td><td>next / previous diff chunk or comment</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">N</span> / <span class="letter">P</span> <b>:</b></td><td>next / previous comment</td>
</tr>
<tr>
<td class="shortcut"><span class="letter"><Enter></span> <b>:</b></td><td>respond to / edit current comment</td>
</tr>
</tbody></table>
</td>
<td>
<table width="100%">
<tbody><tr>
<td></td><th>Issue</th>
</tr>
<tr>
<td class="shortcut"><span class="letter">u</span> <b>:</b></td><td>up to list of issues</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">m</span> <b>:</b></td><td>publish + mail comments</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">j</span> / <span class="letter">k</span> <b>:</b></td><td>jump to patch after / before current patch</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">o</span> / <span class="letter"><Enter></span> <b>:</b></td><td>open current patch in side-by-side view</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">i</span> <b>:</b></td><td>open current patch in unified diff view</td>
</tr>
<tr><td> </td></tr>
<tr><td></td><th>Issue List</th></tr>
<tr>
<td class="shortcut"><span class="letter">j</span> / <span class="letter">k</span> <b>:</b></td><td>jump to issue after / before current issue</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">o</span> / <span class="letter"><Enter></span> <b>:</b></td><td>open current issue</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">#</span> <b>:</b></td>
<td>close issue</td>
</tr>
<tr><td> </td></tr>
<tr>
<td></td><th>Comment/message editing</th>
</tr>
<tr>
<td class="shortcut"><span class="letter"><Ctrl></span> + <span class="letter">s</span> <b>:</b></td><td>save comment</td>
</tr>
<tr>
<td class="shortcut"><span class="letter"><Esc></span> <b>:</b></td><td>cancel edit</td>
</tr>
</tbody></table>
</td>
</tr>
</tbody></table>
</div>
<!-- End help window -->
<div align="right">
<div style="float:left; font-weight:bold"><i>Rietveld</i> Code Review Tool</div>
<b>tomhudson@google.com (TomH)</b>
|
<a class="novisit" href="/settings">Settings</a>
|
<a class="novisit" target="_blank" href="http://code.google.com/p/rietveld/wiki/CodeReviewHelp">Help</a>
|
<a class="novisit" target="_blank" href="http://code.google.com/p/rietveld/issues/list">Bug tracker</a>
|
<a class="novisit" target="_blank" href="http://groups.google.com/group/codereview-discuss">Discussion group</a>
|
<a class="novisit" target="_blank" href="http://code.google.com/p/rietveld">Source code</a>
|
<a class="novisit" href="http://codereview.appspot.com/_ah/logout?continue=https://www.google.com/accounts/Logout%3Fcontinue%3Dhttps://appengine.google.com/_ah/logout%253Fcontinue%253Dhttp://codereview.appspot.com/4571045/%26service%3Dah">Sign out</a>
</div>
<div class="counter">(691)</div>
<div class="mainmenu">
<a href="/" class="active">Issues</a>
<a href="/repos">Repositories</a>
<a href="/search">Search</a>
</div>
<div class="mainmenu2">
<a href="/use_uploadpy">Create Issue</a>
|
<a href="/mine">My Issues</a>
|
<a href="/starred">Starred</a>
|
<a href="/all">Open</a>
|
<a href="/all?closed=1">All</a>
</div>
<div>
<h2>
<span id="issue-star-4571045">
<a href="javascript:M_addIssueStar(4571045)">
<img src="/static/star-dark.gif" width="15" height="15" border="0"></a>
</span>
<span class="issue-close" id="issue-close-4571045">
<a href="javascript:M_closeIssue(4571045)">
<img src="/static/close.gif" title="Close This Issue" width="15" height="15" border="0"></a>
</span>
Issue <a href="/4571045/" onmouseover="M_showPopUp(this, 'popup-issue');">
4571045</a>:
New matrix benchmarks to evaluate ::setConcat implementation options
</h2>
<table class="issue-details" border="0" width="100%">
<tbody><tr valign="top">
<td class="meta" width="20%">
<div>
<a class="novisit" href="/4571045/edit">
Edit Issue
</a>
<br>
<a class="novisit" href="/4571045/publish">
Publish+Mail Comments
</a> ('m')
<br>
<a class="novisit" href="/4571045/diff/1/bench/MatrixBench.cpp">
<b>Start Review</b>
</a>
</div>
<div class="issue_details_sidebar">
<div><b>Created:</b><br>
16 minutes ago by me
</div>
<div><b>Modified:</b><br>
0 minutes ago
</div>
<div><b>Reviewers:</b><br>
<a href="/user/reed1" onmouseover="M_showUserInfoPopup(this)">reed1</a>
</div>
<div><b>CC:</b><br>
</div>
<div><b>Base URL:</b><br>
http://skia.googlecode.com/svn/trunk/
</div>
<div><b>Visibility:</b><br>
Public.
</div>
</div>
</td>
<td style="padding-left: .8em; padding-right: .8em;" width="80%">
<h3><a id="issue-description-pointer" href="javascript:M_toggleSection('issue-description')" class="toggled-section opentriangle">
Description</a></h3>
<div id="issue-description" style="margin-left:15px;">
<pre>On platforms that use Float (instead of Fixed), SkMatrix stores its internal
values as floats, but setConcat() needs extra precision and so uses doubles to
contain intermediate values.
These three benchmarks compare the speed of float-only, double-only, and
float-cast-to-double implementations of a chunk of code extracted from the
non-perspective case of setConcat().
</pre>
</div>
<h3>
<a id="ps-1-pointer" href="javascript:M_toggleSectionForPS('4571045', '1')" class="toggled-section opentriangle">
Patch Set 1
</a>
</h3>
<div id="ps-1" style="">
<div class="issue-list">
<div class="pagination">
<div style="float: left;">
<i>Created:</i> 16 minutes ago
</div>
<div style="float: right;">
<a href="/download/issue4571045_1.diff">
Download raw patch set</a>
</div>
<div style="clear:both;"></div>
</div>
<table id="queues" style="clear:both;">
<tbody><tr align="left">
<th colspan="2"></th>
<th>Unified diffs</th>
<th>Side-by-side diffs</th>
<th>Delta from patch set</th>
<th colspan="3">Stats</th>
<th>Patch</th>
</tr>
<tr name="patch">
<td class="first" width="14"><img src="/static/closedtriangle.gif" style="" width="12" height="9"></td>
<td style="white-space: nowrap">M </td>
<td>
<a class="noul" href="/4571045/patch/1/2">
bench/MatrixBench.cpp
</a>
</td>
<td>
<a class="noul" href="/4571045/diff/1/bench/MatrixBench.cpp">
View
</a>
</td>
<td style="white-space: nowrap">
</td>
<td style="white-space: nowrap">4 chunks</td>
<td style="white-space: nowrap">+114 lines, -3 lines</td>
<td style="white-space: nowrap">
0 comments
</td>
<td>
<a href="/download/issue4571045_1_2.diff" title="Download patch for bench/MatrixBench.cpp">
Download
</a>
</td>
</tr>
</tbody></table>
</div>
</div>
<h3>
<a id="messages-pointer" href="javascript:M_toggleSection('messages')" class="toggled-section opentriangle">
Messages
</a>
</h3>
<div><i>Total messages: 3</i></div>
<div id="messages">
<div style="margin-bottom: .5em;">
<a href="javascript:M_showAllComments('cl', 3)">
Expand All Messages</a>
|
<a href="javascript:M_hideAllComments('cl', 3)">
Collapse All Messages</a>
</div>
<div class="message " id="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UY6QcM" name="0">
<a name="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UY6QcM"></a>
<div class="header">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tbody><tr class="comment_title" onclick="M_switchChangelistComment(0)">
<td style="padding-left: 5px; white-space: nowrap;">
<b>me</b>
</td>
<td width="100%">
<table style="table-layout:fixed; white-space: nowrap;" width="100%">
<tbody><tr>
<td>
<div style="white-space: nowrap; overflow: hidden;" class="extra" id="cl-preview-0">
</div>
</td>
</tr>
</tbody></table>
</td>
<td align="right" style="white-space: nowrap; padding-right: 5px;">
13 minutes ago
</td>
</tr>
</tbody></table>
</div>
<div id="cl-comment-0" style="display: none;">
<div class="message-body">
<pre name="cl-message-0"></pre>
</div>
<div class="message-actions">
<a href="javascript:M_replyToMessage('0', '2011/06/03 18:57:35', 'TomH')" id="message-reply-href-0">Reply</a>
<textarea rows="7" cols="70" name="message" style="display:none"></textarea>
<div id="message-reply-0" style="display:none;"></div>
</div>
</div>
</div>
<div class="message " id="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UY0Q8M" name="1">
<a name="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UY0Q8M"></a>
<div class="header">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tbody><tr class="comment_title" onclick="M_switchChangelistComment(1)">
<td style="padding-left: 5px; white-space: nowrap;">
<b>reed1</b>
</td>
<td width="100%">
<table style="table-layout:fixed; white-space: nowrap;" width="100%">
<tbody><tr>
<td>
<div style="white-space: nowrap; overflow: hidden;" class="extra" id="cl-preview-1">
1. lets remove the "fix" from the function name. just muladdmul I think 2. we ...
</div>
</td>
</tr>
</tbody></table>
</td>
<td align="right" style="white-space: nowrap; padding-right: 5px;">
10 minutes ago
</td>
</tr>
</tbody></table>
</div>
<div id="cl-comment-1" style="display: none;">
<div class="message-body">
<pre name="cl-message-1">1. lets remove the "fix" from the function name. just muladdmul I think
2. we can remove the return, since it will be compiled away anyway
3. nice checkin comment!
4. what are the results like?</pre>
</div>
<div class="message-actions">
<a href="javascript:M_replyToMessage('1', '2011/06/03 19:00:39', 'reed1')" id="message-reply-href-1">Reply</a>
<textarea rows="7" cols="70" name="message" style="display:none"></textarea>
<div id="message-reply-1" style="display:none;"></div>
</div>
</div>
</div>
<div class="message " id="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UYuRcM" name="2">
<a name="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UYuRcM"></a>
<div class="header">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tbody><tr class="comment_title" onclick="M_switchChangelistComment(2)">
<td style="padding-left: 5px; white-space: nowrap;">
<b>me</b>
</td>
<td width="100%">
<table style="table-layout:fixed; white-space: nowrap;" width="100%">
<tbody><tr>
<td>
<div style="white-space: nowrap; overflow: hidden; visibility: hidden;" class="extra" id="cl-preview-2">
> 4. what are the results like? For posterity: tomhudson@tomhudson-zx600-linux:/usr/local/google/src/skia3$ out/bench/bench -match matrix_concat -repeat 1000 ...
</div>
</td>
</tr>
</tbody></table>
</td>
<td align="right" style="white-space: nowrap; padding-right: 5px;">
0 minutes ago
</td>
</tr>
</tbody></table>
</div>
<div id="cl-comment-2">
<div class="message-body">
<pre name="cl-message-2">> 4. what are the results like?
For posterity:
tomhudson@tomhudson-zx600-linux:/usr/local/google/src/skia3$ out/bench/bench
-match matrix_concat -repeat 1000
skia bench: alpha=0xFF antialias=1 filter=0
running bench [640 480] matrix_concat_double 8888: msecs = 0.79 565:
msecs = 0.79 GPU: msecs = 0.79
running bench [640 480] matrix_concat_floatdouble 8888: msecs = 0.97 565:
msecs = 0.97 GPU: msecs = 0.97
running bench [640 480] matrix_concat_float 8888: msecs = 0.74 565:
msecs = 0.73 GPU: msecs = 0.74</pre>
</div>
<div class="message-actions">
<a href="javascript:M_replyToMessage('2', '2011/06/03 19:11:06', 'TomH')" id="message-reply-href-2">Reply</a>
<textarea rows="7" cols="70" name="message" style="display:none"></textarea>
<div id="message-reply-2" style="display:none;"></div>
</div>
</div>
</div>
<div>
<a href="javascript:M_showAllComments('cl', 3)">
Expand All Messages</a>
|
<a href="javascript:M_hideAllComments('cl', 3)">
Collapse All Messages</a>
</div>
</div>
<script language="JavaScript" type="text/javascript">
<!--
document.onkeydown = M_changelistKeyDown;
var dashboardState = new M_DashboardState(window, 'patch', 'M_CLPatchMarker');
M_switchChangelistCommentByAnchor();
// -->
</script>
<div style="display:none;">
<form method="POST" action="/4571045/publish" id="message-reply-form">
<input type="hidden" name="xsrf_token" value="dd5d1a57ca1d5440593050fdc596d377">
<div></div>
<input type="hidden" name="subject" value="New matrix benchmarks to evaluate ::setConcat implementation options">
<input type="hidden" name="message_only" value="1">
<input type="submit" value="Send Message">
<input type="button" value="Discard" name="discard">
<input type="checkbox" name="send_mail" value="1" id="message-reply-send-mail" checked="checked">
<label>Send mail to reviewers</label>
</form>
</div>
<a id="resizer" class="resizer" style="display:none;cursor:pointer">
<img src="/static/zippyplus.gif">
</a>
</td>
</tr>
</tbody></table>
</div>
<div class="popup" id="popup-issue" style="left: 104px; top: 116px; visibility: hidden; ">
<b>Issue 4571045: New matrix benchmarks to evaluate ::setConcat implementation options
</b><br>
Created 16 minutes ago by me<br>
Modified 0 minutes ago<br>
Reviewers: reed1<br>
Base URL: http://skia.googlecode.com/svn/trunk/<br>
Comments: 0
</div>
<p></p>
<div style="float: left;">
<a target="_blank" href="http://code.google.com/appengine/"><img border="0" src="/static/appengine-noborder-120x30.gif" alt="Powered by Google App Engine"></a>
</div>
<div class="extra" style="font-size: 9pt; float: right; text-align: right;">
<div style="height:14px;">
<img src="/static/rss.gif" alt="RSS Feeds" width="14" height="14" align="top">
<a href="/rss/all">Recent Issues</a>
|
<a href="/rss/mine/TomH">My Issues</a>
|
<a href="/rss/reviews/TomH">My Reviews</a>
|
<a href="/rss/closed/TomH">My Closed</a>
|
<a href="/rss/issue/4571045">This issue</a>
</div>
<div style="margin-top: .3em;">This is Rietveld <a href="http://code.google.com/p/rietveld/updates/list">r756
</a></div>
</div>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script><script src="http://www.google-analytics.com/ga.js" type="text/javascript"></script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-4803694-4");
pageTracker._initData();
pageTracker._trackPageview();
</script>
On platforms that use Float (instead of Fixed), SkMatrix stores its internal
values as floats, but setConcat() needs extra precision and so uses doubles
to contain intermediate values.
These three benchmarks compare the speed of float-only, double-only, and
float-cast-to-double implementations of a chunk of code extracted from the
non-perspective case of setConcat().
git-svn-id: http://skia.googlecode.com/svn/trunk@1497 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-06-03 19:16:56 +00:00
|
|
|
static inline void muladdmul(double a, double b, double c, double d,
|
|
|
|
double* result) {
|
|
|
|
*result = a * b + c * d;
|
|
|
|
}
|
|
|
|
virtual void performTest() {
|
2011-06-03 20:32:58 +00:00
|
|
|
const double* a = mya;
|
|
|
|
const double* b = myb;
|
|
|
|
double* r = myr;
|
<body onunload="M_unloadPage();">
<!-- Begin help window -->
<script type="text/javascript"><!--
var xsrfToken = 'dd5d1a57ca1d5440593050fdc596d377';
var helpDisplayed = false;
document.onclick = M_clickCommon;
var media_url = "/static/";
var base_url = "/";
var publish_link = "/4571045/publish";
// -->
</script>
<div id="help" style="display: none;">
<div style="font-size: medium; text-align: center;">Keyboard Shortcuts</div>
<hr>
<table width="100%">
<tbody><tr valign="top">
<td>
<table width="100%">
<tbody><tr>
<td></td><th>File</th>
</tr>
<tr>
<td class="shortcut"><span class="letter">u</span> <b>:</b></td><td>up to issue</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">m</span> <b>:</b></td><td>publish + mail comments</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">M</span> <b>:</b></td><td>edit review message</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">j</span> / <span class="letter">k</span> <b>:</b></td><td>jump to file after / before current file</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">J</span> / <span class="letter">K</span> <b>:</b></td><td>jump to next file with a comment after / before current file</td>
</tr>
<tr>
<td></td><th>Side-by-side diff</th>
</tr>
<tr>
<td class="shortcut"><span class="letter">i</span> <b>:</b></td><td>toggle intra-line diffs</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">e</span> <b>:</b></td><td>expand all comments</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">c</span> <b>:</b></td><td>collapse all comments</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">s</span> <b>:</b></td><td>toggle showing all comments</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">n</span> / <span class="letter">p</span> <b>:</b></td><td>next / previous diff chunk or comment</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">N</span> / <span class="letter">P</span> <b>:</b></td><td>next / previous comment</td>
</tr>
<tr>
<td class="shortcut"><span class="letter"><Enter></span> <b>:</b></td><td>respond to / edit current comment</td>
</tr>
</tbody></table>
</td>
<td>
<table width="100%">
<tbody><tr>
<td></td><th>Issue</th>
</tr>
<tr>
<td class="shortcut"><span class="letter">u</span> <b>:</b></td><td>up to list of issues</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">m</span> <b>:</b></td><td>publish + mail comments</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">j</span> / <span class="letter">k</span> <b>:</b></td><td>jump to patch after / before current patch</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">o</span> / <span class="letter"><Enter></span> <b>:</b></td><td>open current patch in side-by-side view</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">i</span> <b>:</b></td><td>open current patch in unified diff view</td>
</tr>
<tr><td> </td></tr>
<tr><td></td><th>Issue List</th></tr>
<tr>
<td class="shortcut"><span class="letter">j</span> / <span class="letter">k</span> <b>:</b></td><td>jump to issue after / before current issue</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">o</span> / <span class="letter"><Enter></span> <b>:</b></td><td>open current issue</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">#</span> <b>:</b></td>
<td>close issue</td>
</tr>
<tr><td> </td></tr>
<tr>
<td></td><th>Comment/message editing</th>
</tr>
<tr>
<td class="shortcut"><span class="letter"><Ctrl></span> + <span class="letter">s</span> <b>:</b></td><td>save comment</td>
</tr>
<tr>
<td class="shortcut"><span class="letter"><Esc></span> <b>:</b></td><td>cancel edit</td>
</tr>
</tbody></table>
</td>
</tr>
</tbody></table>
</div>
<!-- End help window -->
<div align="right">
<div style="float:left; font-weight:bold"><i>Rietveld</i> Code Review Tool</div>
<b>tomhudson@google.com (TomH)</b>
|
<a class="novisit" href="/settings">Settings</a>
|
<a class="novisit" target="_blank" href="http://code.google.com/p/rietveld/wiki/CodeReviewHelp">Help</a>
|
<a class="novisit" target="_blank" href="http://code.google.com/p/rietveld/issues/list">Bug tracker</a>
|
<a class="novisit" target="_blank" href="http://groups.google.com/group/codereview-discuss">Discussion group</a>
|
<a class="novisit" target="_blank" href="http://code.google.com/p/rietveld">Source code</a>
|
<a class="novisit" href="http://codereview.appspot.com/_ah/logout?continue=https://www.google.com/accounts/Logout%3Fcontinue%3Dhttps://appengine.google.com/_ah/logout%253Fcontinue%253Dhttp://codereview.appspot.com/4571045/%26service%3Dah">Sign out</a>
</div>
<div class="counter">(691)</div>
<div class="mainmenu">
<a href="/" class="active">Issues</a>
<a href="/repos">Repositories</a>
<a href="/search">Search</a>
</div>
<div class="mainmenu2">
<a href="/use_uploadpy">Create Issue</a>
|
<a href="/mine">My Issues</a>
|
<a href="/starred">Starred</a>
|
<a href="/all">Open</a>
|
<a href="/all?closed=1">All</a>
</div>
<div>
<h2>
<span id="issue-star-4571045">
<a href="javascript:M_addIssueStar(4571045)">
<img src="/static/star-dark.gif" width="15" height="15" border="0"></a>
</span>
<span class="issue-close" id="issue-close-4571045">
<a href="javascript:M_closeIssue(4571045)">
<img src="/static/close.gif" title="Close This Issue" width="15" height="15" border="0"></a>
</span>
Issue <a href="/4571045/" onmouseover="M_showPopUp(this, 'popup-issue');">
4571045</a>:
New matrix benchmarks to evaluate ::setConcat implementation options
</h2>
<table class="issue-details" border="0" width="100%">
<tbody><tr valign="top">
<td class="meta" width="20%">
<div>
<a class="novisit" href="/4571045/edit">
Edit Issue
</a>
<br>
<a class="novisit" href="/4571045/publish">
Publish+Mail Comments
</a> ('m')
<br>
<a class="novisit" href="/4571045/diff/1/bench/MatrixBench.cpp">
<b>Start Review</b>
</a>
</div>
<div class="issue_details_sidebar">
<div><b>Created:</b><br>
16 minutes ago by me
</div>
<div><b>Modified:</b><br>
0 minutes ago
</div>
<div><b>Reviewers:</b><br>
<a href="/user/reed1" onmouseover="M_showUserInfoPopup(this)">reed1</a>
</div>
<div><b>CC:</b><br>
</div>
<div><b>Base URL:</b><br>
http://skia.googlecode.com/svn/trunk/
</div>
<div><b>Visibility:</b><br>
Public.
</div>
</div>
</td>
<td style="padding-left: .8em; padding-right: .8em;" width="80%">
<h3><a id="issue-description-pointer" href="javascript:M_toggleSection('issue-description')" class="toggled-section opentriangle">
Description</a></h3>
<div id="issue-description" style="margin-left:15px;">
<pre>On platforms that use Float (instead of Fixed), SkMatrix stores its internal
values as floats, but setConcat() needs extra precision and so uses doubles to
contain intermediate values.
These three benchmarks compare the speed of float-only, double-only, and
float-cast-to-double implementations of a chunk of code extracted from the
non-perspective case of setConcat().
</pre>
</div>
<h3>
<a id="ps-1-pointer" href="javascript:M_toggleSectionForPS('4571045', '1')" class="toggled-section opentriangle">
Patch Set 1
</a>
</h3>
<div id="ps-1" style="">
<div class="issue-list">
<div class="pagination">
<div style="float: left;">
<i>Created:</i> 16 minutes ago
</div>
<div style="float: right;">
<a href="/download/issue4571045_1.diff">
Download raw patch set</a>
</div>
<div style="clear:both;"></div>
</div>
<table id="queues" style="clear:both;">
<tbody><tr align="left">
<th colspan="2"></th>
<th>Unified diffs</th>
<th>Side-by-side diffs</th>
<th>Delta from patch set</th>
<th colspan="3">Stats</th>
<th>Patch</th>
</tr>
<tr name="patch">
<td class="first" width="14"><img src="/static/closedtriangle.gif" style="" width="12" height="9"></td>
<td style="white-space: nowrap">M </td>
<td>
<a class="noul" href="/4571045/patch/1/2">
bench/MatrixBench.cpp
</a>
</td>
<td>
<a class="noul" href="/4571045/diff/1/bench/MatrixBench.cpp">
View
</a>
</td>
<td style="white-space: nowrap">
</td>
<td style="white-space: nowrap">4 chunks</td>
<td style="white-space: nowrap">+114 lines, -3 lines</td>
<td style="white-space: nowrap">
0 comments
</td>
<td>
<a href="/download/issue4571045_1_2.diff" title="Download patch for bench/MatrixBench.cpp">
Download
</a>
</td>
</tr>
</tbody></table>
</div>
</div>
<h3>
<a id="messages-pointer" href="javascript:M_toggleSection('messages')" class="toggled-section opentriangle">
Messages
</a>
</h3>
<div><i>Total messages: 3</i></div>
<div id="messages">
<div style="margin-bottom: .5em;">
<a href="javascript:M_showAllComments('cl', 3)">
Expand All Messages</a>
|
<a href="javascript:M_hideAllComments('cl', 3)">
Collapse All Messages</a>
</div>
<div class="message " id="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UY6QcM" name="0">
<a name="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UY6QcM"></a>
<div class="header">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tbody><tr class="comment_title" onclick="M_switchChangelistComment(0)">
<td style="padding-left: 5px; white-space: nowrap;">
<b>me</b>
</td>
<td width="100%">
<table style="table-layout:fixed; white-space: nowrap;" width="100%">
<tbody><tr>
<td>
<div style="white-space: nowrap; overflow: hidden;" class="extra" id="cl-preview-0">
</div>
</td>
</tr>
</tbody></table>
</td>
<td align="right" style="white-space: nowrap; padding-right: 5px;">
13 minutes ago
</td>
</tr>
</tbody></table>
</div>
<div id="cl-comment-0" style="display: none;">
<div class="message-body">
<pre name="cl-message-0"></pre>
</div>
<div class="message-actions">
<a href="javascript:M_replyToMessage('0', '2011/06/03 18:57:35', 'TomH')" id="message-reply-href-0">Reply</a>
<textarea rows="7" cols="70" name="message" style="display:none"></textarea>
<div id="message-reply-0" style="display:none;"></div>
</div>
</div>
</div>
<div class="message " id="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UY0Q8M" name="1">
<a name="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UY0Q8M"></a>
<div class="header">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tbody><tr class="comment_title" onclick="M_switchChangelistComment(1)">
<td style="padding-left: 5px; white-space: nowrap;">
<b>reed1</b>
</td>
<td width="100%">
<table style="table-layout:fixed; white-space: nowrap;" width="100%">
<tbody><tr>
<td>
<div style="white-space: nowrap; overflow: hidden;" class="extra" id="cl-preview-1">
1. lets remove the "fix" from the function name. just muladdmul I think 2. we ...
</div>
</td>
</tr>
</tbody></table>
</td>
<td align="right" style="white-space: nowrap; padding-right: 5px;">
10 minutes ago
</td>
</tr>
</tbody></table>
</div>
<div id="cl-comment-1" style="display: none;">
<div class="message-body">
<pre name="cl-message-1">1. lets remove the "fix" from the function name. just muladdmul I think
2. we can remove the return, since it will be compiled away anyway
3. nice checkin comment!
4. what are the results like?</pre>
</div>
<div class="message-actions">
<a href="javascript:M_replyToMessage('1', '2011/06/03 19:00:39', 'reed1')" id="message-reply-href-1">Reply</a>
<textarea rows="7" cols="70" name="message" style="display:none"></textarea>
<div id="message-reply-1" style="display:none;"></div>
</div>
</div>
</div>
<div class="message " id="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UYuRcM" name="2">
<a name="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UYuRcM"></a>
<div class="header">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tbody><tr class="comment_title" onclick="M_switchChangelistComment(2)">
<td style="padding-left: 5px; white-space: nowrap;">
<b>me</b>
</td>
<td width="100%">
<table style="table-layout:fixed; white-space: nowrap;" width="100%">
<tbody><tr>
<td>
<div style="white-space: nowrap; overflow: hidden; visibility: hidden;" class="extra" id="cl-preview-2">
> 4. what are the results like? For posterity: tomhudson@tomhudson-zx600-linux:/usr/local/google/src/skia3$ out/bench/bench -match matrix_concat -repeat 1000 ...
</div>
</td>
</tr>
</tbody></table>
</td>
<td align="right" style="white-space: nowrap; padding-right: 5px;">
0 minutes ago
</td>
</tr>
</tbody></table>
</div>
<div id="cl-comment-2">
<div class="message-body">
<pre name="cl-message-2">> 4. what are the results like?
For posterity:
tomhudson@tomhudson-zx600-linux:/usr/local/google/src/skia3$ out/bench/bench
-match matrix_concat -repeat 1000
skia bench: alpha=0xFF antialias=1 filter=0
running bench [640 480] matrix_concat_double 8888: msecs = 0.79 565:
msecs = 0.79 GPU: msecs = 0.79
running bench [640 480] matrix_concat_floatdouble 8888: msecs = 0.97 565:
msecs = 0.97 GPU: msecs = 0.97
running bench [640 480] matrix_concat_float 8888: msecs = 0.74 565:
msecs = 0.73 GPU: msecs = 0.74</pre>
</div>
<div class="message-actions">
<a href="javascript:M_replyToMessage('2', '2011/06/03 19:11:06', 'TomH')" id="message-reply-href-2">Reply</a>
<textarea rows="7" cols="70" name="message" style="display:none"></textarea>
<div id="message-reply-2" style="display:none;"></div>
</div>
</div>
</div>
<div>
<a href="javascript:M_showAllComments('cl', 3)">
Expand All Messages</a>
|
<a href="javascript:M_hideAllComments('cl', 3)">
Collapse All Messages</a>
</div>
</div>
<script language="JavaScript" type="text/javascript">
<!--
document.onkeydown = M_changelistKeyDown;
var dashboardState = new M_DashboardState(window, 'patch', 'M_CLPatchMarker');
M_switchChangelistCommentByAnchor();
// -->
</script>
<div style="display:none;">
<form method="POST" action="/4571045/publish" id="message-reply-form">
<input type="hidden" name="xsrf_token" value="dd5d1a57ca1d5440593050fdc596d377">
<div></div>
<input type="hidden" name="subject" value="New matrix benchmarks to evaluate ::setConcat implementation options">
<input type="hidden" name="message_only" value="1">
<input type="submit" value="Send Message">
<input type="button" value="Discard" name="discard">
<input type="checkbox" name="send_mail" value="1" id="message-reply-send-mail" checked="checked">
<label>Send mail to reviewers</label>
</form>
</div>
<a id="resizer" class="resizer" style="display:none;cursor:pointer">
<img src="/static/zippyplus.gif">
</a>
</td>
</tr>
</tbody></table>
</div>
<div class="popup" id="popup-issue" style="left: 104px; top: 116px; visibility: hidden; ">
<b>Issue 4571045: New matrix benchmarks to evaluate ::setConcat implementation options
</b><br>
Created 16 minutes ago by me<br>
Modified 0 minutes ago<br>
Reviewers: reed1<br>
Base URL: http://skia.googlecode.com/svn/trunk/<br>
Comments: 0
</div>
<p></p>
<div style="float: left;">
<a target="_blank" href="http://code.google.com/appengine/"><img border="0" src="/static/appengine-noborder-120x30.gif" alt="Powered by Google App Engine"></a>
</div>
<div class="extra" style="font-size: 9pt; float: right; text-align: right;">
<div style="height:14px;">
<img src="/static/rss.gif" alt="RSS Feeds" width="14" height="14" align="top">
<a href="/rss/all">Recent Issues</a>
|
<a href="/rss/mine/TomH">My Issues</a>
|
<a href="/rss/reviews/TomH">My Reviews</a>
|
<a href="/rss/closed/TomH">My Closed</a>
|
<a href="/rss/issue/4571045">This issue</a>
</div>
<div style="margin-top: .3em;">This is Rietveld <a href="http://code.google.com/p/rietveld/updates/list">r756
</a></div>
</div>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script><script src="http://www.google-analytics.com/ga.js" type="text/javascript"></script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-4803694-4");
pageTracker._initData();
pageTracker._trackPageview();
</script>
On platforms that use Float (instead of Fixed), SkMatrix stores its internal
values as floats, but setConcat() needs extra precision and so uses doubles
to contain intermediate values.
These three benchmarks compare the speed of float-only, double-only, and
float-cast-to-double implementations of a chunk of code extracted from the
non-perspective case of setConcat().
git-svn-id: http://skia.googlecode.com/svn/trunk@1497 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-06-03 19:16:56 +00:00
|
|
|
muladdmul(a[0], b[0], a[1], b[3], &r[0]);
|
|
|
|
muladdmul(a[0], b[1], a[1], b[4], &r[1]);
|
|
|
|
muladdmul(a[0], b[2], a[1], b[5], &r[2]);
|
2011-06-03 20:32:58 +00:00
|
|
|
r[2] += a[2];
|
<body onunload="M_unloadPage();">
<!-- Begin help window -->
<script type="text/javascript"><!--
var xsrfToken = 'dd5d1a57ca1d5440593050fdc596d377';
var helpDisplayed = false;
document.onclick = M_clickCommon;
var media_url = "/static/";
var base_url = "/";
var publish_link = "/4571045/publish";
// -->
</script>
<div id="help" style="display: none;">
<div style="font-size: medium; text-align: center;">Keyboard Shortcuts</div>
<hr>
<table width="100%">
<tbody><tr valign="top">
<td>
<table width="100%">
<tbody><tr>
<td></td><th>File</th>
</tr>
<tr>
<td class="shortcut"><span class="letter">u</span> <b>:</b></td><td>up to issue</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">m</span> <b>:</b></td><td>publish + mail comments</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">M</span> <b>:</b></td><td>edit review message</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">j</span> / <span class="letter">k</span> <b>:</b></td><td>jump to file after / before current file</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">J</span> / <span class="letter">K</span> <b>:</b></td><td>jump to next file with a comment after / before current file</td>
</tr>
<tr>
<td></td><th>Side-by-side diff</th>
</tr>
<tr>
<td class="shortcut"><span class="letter">i</span> <b>:</b></td><td>toggle intra-line diffs</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">e</span> <b>:</b></td><td>expand all comments</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">c</span> <b>:</b></td><td>collapse all comments</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">s</span> <b>:</b></td><td>toggle showing all comments</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">n</span> / <span class="letter">p</span> <b>:</b></td><td>next / previous diff chunk or comment</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">N</span> / <span class="letter">P</span> <b>:</b></td><td>next / previous comment</td>
</tr>
<tr>
<td class="shortcut"><span class="letter"><Enter></span> <b>:</b></td><td>respond to / edit current comment</td>
</tr>
</tbody></table>
</td>
<td>
<table width="100%">
<tbody><tr>
<td></td><th>Issue</th>
</tr>
<tr>
<td class="shortcut"><span class="letter">u</span> <b>:</b></td><td>up to list of issues</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">m</span> <b>:</b></td><td>publish + mail comments</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">j</span> / <span class="letter">k</span> <b>:</b></td><td>jump to patch after / before current patch</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">o</span> / <span class="letter"><Enter></span> <b>:</b></td><td>open current patch in side-by-side view</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">i</span> <b>:</b></td><td>open current patch in unified diff view</td>
</tr>
<tr><td> </td></tr>
<tr><td></td><th>Issue List</th></tr>
<tr>
<td class="shortcut"><span class="letter">j</span> / <span class="letter">k</span> <b>:</b></td><td>jump to issue after / before current issue</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">o</span> / <span class="letter"><Enter></span> <b>:</b></td><td>open current issue</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">#</span> <b>:</b></td>
<td>close issue</td>
</tr>
<tr><td> </td></tr>
<tr>
<td></td><th>Comment/message editing</th>
</tr>
<tr>
<td class="shortcut"><span class="letter"><Ctrl></span> + <span class="letter">s</span> <b>:</b></td><td>save comment</td>
</tr>
<tr>
<td class="shortcut"><span class="letter"><Esc></span> <b>:</b></td><td>cancel edit</td>
</tr>
</tbody></table>
</td>
</tr>
</tbody></table>
</div>
<!-- End help window -->
<div align="right">
<div style="float:left; font-weight:bold"><i>Rietveld</i> Code Review Tool</div>
<b>tomhudson@google.com (TomH)</b>
|
<a class="novisit" href="/settings">Settings</a>
|
<a class="novisit" target="_blank" href="http://code.google.com/p/rietveld/wiki/CodeReviewHelp">Help</a>
|
<a class="novisit" target="_blank" href="http://code.google.com/p/rietveld/issues/list">Bug tracker</a>
|
<a class="novisit" target="_blank" href="http://groups.google.com/group/codereview-discuss">Discussion group</a>
|
<a class="novisit" target="_blank" href="http://code.google.com/p/rietveld">Source code</a>
|
<a class="novisit" href="http://codereview.appspot.com/_ah/logout?continue=https://www.google.com/accounts/Logout%3Fcontinue%3Dhttps://appengine.google.com/_ah/logout%253Fcontinue%253Dhttp://codereview.appspot.com/4571045/%26service%3Dah">Sign out</a>
</div>
<div class="counter">(691)</div>
<div class="mainmenu">
<a href="/" class="active">Issues</a>
<a href="/repos">Repositories</a>
<a href="/search">Search</a>
</div>
<div class="mainmenu2">
<a href="/use_uploadpy">Create Issue</a>
|
<a href="/mine">My Issues</a>
|
<a href="/starred">Starred</a>
|
<a href="/all">Open</a>
|
<a href="/all?closed=1">All</a>
</div>
<div>
<h2>
<span id="issue-star-4571045">
<a href="javascript:M_addIssueStar(4571045)">
<img src="/static/star-dark.gif" width="15" height="15" border="0"></a>
</span>
<span class="issue-close" id="issue-close-4571045">
<a href="javascript:M_closeIssue(4571045)">
<img src="/static/close.gif" title="Close This Issue" width="15" height="15" border="0"></a>
</span>
Issue <a href="/4571045/" onmouseover="M_showPopUp(this, 'popup-issue');">
4571045</a>:
New matrix benchmarks to evaluate ::setConcat implementation options
</h2>
<table class="issue-details" border="0" width="100%">
<tbody><tr valign="top">
<td class="meta" width="20%">
<div>
<a class="novisit" href="/4571045/edit">
Edit Issue
</a>
<br>
<a class="novisit" href="/4571045/publish">
Publish+Mail Comments
</a> ('m')
<br>
<a class="novisit" href="/4571045/diff/1/bench/MatrixBench.cpp">
<b>Start Review</b>
</a>
</div>
<div class="issue_details_sidebar">
<div><b>Created:</b><br>
16 minutes ago by me
</div>
<div><b>Modified:</b><br>
0 minutes ago
</div>
<div><b>Reviewers:</b><br>
<a href="/user/reed1" onmouseover="M_showUserInfoPopup(this)">reed1</a>
</div>
<div><b>CC:</b><br>
</div>
<div><b>Base URL:</b><br>
http://skia.googlecode.com/svn/trunk/
</div>
<div><b>Visibility:</b><br>
Public.
</div>
</div>
</td>
<td style="padding-left: .8em; padding-right: .8em;" width="80%">
<h3><a id="issue-description-pointer" href="javascript:M_toggleSection('issue-description')" class="toggled-section opentriangle">
Description</a></h3>
<div id="issue-description" style="margin-left:15px;">
<pre>On platforms that use Float (instead of Fixed), SkMatrix stores its internal
values as floats, but setConcat() needs extra precision and so uses doubles to
contain intermediate values.
These three benchmarks compare the speed of float-only, double-only, and
float-cast-to-double implementations of a chunk of code extracted from the
non-perspective case of setConcat().
</pre>
</div>
<h3>
<a id="ps-1-pointer" href="javascript:M_toggleSectionForPS('4571045', '1')" class="toggled-section opentriangle">
Patch Set 1
</a>
</h3>
<div id="ps-1" style="">
<div class="issue-list">
<div class="pagination">
<div style="float: left;">
<i>Created:</i> 16 minutes ago
</div>
<div style="float: right;">
<a href="/download/issue4571045_1.diff">
Download raw patch set</a>
</div>
<div style="clear:both;"></div>
</div>
<table id="queues" style="clear:both;">
<tbody><tr align="left">
<th colspan="2"></th>
<th>Unified diffs</th>
<th>Side-by-side diffs</th>
<th>Delta from patch set</th>
<th colspan="3">Stats</th>
<th>Patch</th>
</tr>
<tr name="patch">
<td class="first" width="14"><img src="/static/closedtriangle.gif" style="" width="12" height="9"></td>
<td style="white-space: nowrap">M </td>
<td>
<a class="noul" href="/4571045/patch/1/2">
bench/MatrixBench.cpp
</a>
</td>
<td>
<a class="noul" href="/4571045/diff/1/bench/MatrixBench.cpp">
View
</a>
</td>
<td style="white-space: nowrap">
</td>
<td style="white-space: nowrap">4 chunks</td>
<td style="white-space: nowrap">+114 lines, -3 lines</td>
<td style="white-space: nowrap">
0 comments
</td>
<td>
<a href="/download/issue4571045_1_2.diff" title="Download patch for bench/MatrixBench.cpp">
Download
</a>
</td>
</tr>
</tbody></table>
</div>
</div>
<h3>
<a id="messages-pointer" href="javascript:M_toggleSection('messages')" class="toggled-section opentriangle">
Messages
</a>
</h3>
<div><i>Total messages: 3</i></div>
<div id="messages">
<div style="margin-bottom: .5em;">
<a href="javascript:M_showAllComments('cl', 3)">
Expand All Messages</a>
|
<a href="javascript:M_hideAllComments('cl', 3)">
Collapse All Messages</a>
</div>
<div class="message " id="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UY6QcM" name="0">
<a name="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UY6QcM"></a>
<div class="header">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tbody><tr class="comment_title" onclick="M_switchChangelistComment(0)">
<td style="padding-left: 5px; white-space: nowrap;">
<b>me</b>
</td>
<td width="100%">
<table style="table-layout:fixed; white-space: nowrap;" width="100%">
<tbody><tr>
<td>
<div style="white-space: nowrap; overflow: hidden;" class="extra" id="cl-preview-0">
</div>
</td>
</tr>
</tbody></table>
</td>
<td align="right" style="white-space: nowrap; padding-right: 5px;">
13 minutes ago
</td>
</tr>
</tbody></table>
</div>
<div id="cl-comment-0" style="display: none;">
<div class="message-body">
<pre name="cl-message-0"></pre>
</div>
<div class="message-actions">
<a href="javascript:M_replyToMessage('0', '2011/06/03 18:57:35', 'TomH')" id="message-reply-href-0">Reply</a>
<textarea rows="7" cols="70" name="message" style="display:none"></textarea>
<div id="message-reply-0" style="display:none;"></div>
</div>
</div>
</div>
<div class="message " id="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UY0Q8M" name="1">
<a name="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UY0Q8M"></a>
<div class="header">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tbody><tr class="comment_title" onclick="M_switchChangelistComment(1)">
<td style="padding-left: 5px; white-space: nowrap;">
<b>reed1</b>
</td>
<td width="100%">
<table style="table-layout:fixed; white-space: nowrap;" width="100%">
<tbody><tr>
<td>
<div style="white-space: nowrap; overflow: hidden;" class="extra" id="cl-preview-1">
1. lets remove the "fix" from the function name. just muladdmul I think 2. we ...
</div>
</td>
</tr>
</tbody></table>
</td>
<td align="right" style="white-space: nowrap; padding-right: 5px;">
10 minutes ago
</td>
</tr>
</tbody></table>
</div>
<div id="cl-comment-1" style="display: none;">
<div class="message-body">
<pre name="cl-message-1">1. lets remove the "fix" from the function name. just muladdmul I think
2. we can remove the return, since it will be compiled away anyway
3. nice checkin comment!
4. what are the results like?</pre>
</div>
<div class="message-actions">
<a href="javascript:M_replyToMessage('1', '2011/06/03 19:00:39', 'reed1')" id="message-reply-href-1">Reply</a>
<textarea rows="7" cols="70" name="message" style="display:none"></textarea>
<div id="message-reply-1" style="display:none;"></div>
</div>
</div>
</div>
<div class="message " id="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UYuRcM" name="2">
<a name="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UYuRcM"></a>
<div class="header">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tbody><tr class="comment_title" onclick="M_switchChangelistComment(2)">
<td style="padding-left: 5px; white-space: nowrap;">
<b>me</b>
</td>
<td width="100%">
<table style="table-layout:fixed; white-space: nowrap;" width="100%">
<tbody><tr>
<td>
<div style="white-space: nowrap; overflow: hidden; visibility: hidden;" class="extra" id="cl-preview-2">
> 4. what are the results like? For posterity: tomhudson@tomhudson-zx600-linux:/usr/local/google/src/skia3$ out/bench/bench -match matrix_concat -repeat 1000 ...
</div>
</td>
</tr>
</tbody></table>
</td>
<td align="right" style="white-space: nowrap; padding-right: 5px;">
0 minutes ago
</td>
</tr>
</tbody></table>
</div>
<div id="cl-comment-2">
<div class="message-body">
<pre name="cl-message-2">> 4. what are the results like?
For posterity:
tomhudson@tomhudson-zx600-linux:/usr/local/google/src/skia3$ out/bench/bench
-match matrix_concat -repeat 1000
skia bench: alpha=0xFF antialias=1 filter=0
running bench [640 480] matrix_concat_double 8888: msecs = 0.79 565:
msecs = 0.79 GPU: msecs = 0.79
running bench [640 480] matrix_concat_floatdouble 8888: msecs = 0.97 565:
msecs = 0.97 GPU: msecs = 0.97
running bench [640 480] matrix_concat_float 8888: msecs = 0.74 565:
msecs = 0.73 GPU: msecs = 0.74</pre>
</div>
<div class="message-actions">
<a href="javascript:M_replyToMessage('2', '2011/06/03 19:11:06', 'TomH')" id="message-reply-href-2">Reply</a>
<textarea rows="7" cols="70" name="message" style="display:none"></textarea>
<div id="message-reply-2" style="display:none;"></div>
</div>
</div>
</div>
<div>
<a href="javascript:M_showAllComments('cl', 3)">
Expand All Messages</a>
|
<a href="javascript:M_hideAllComments('cl', 3)">
Collapse All Messages</a>
</div>
</div>
<script language="JavaScript" type="text/javascript">
<!--
document.onkeydown = M_changelistKeyDown;
var dashboardState = new M_DashboardState(window, 'patch', 'M_CLPatchMarker');
M_switchChangelistCommentByAnchor();
// -->
</script>
<div style="display:none;">
<form method="POST" action="/4571045/publish" id="message-reply-form">
<input type="hidden" name="xsrf_token" value="dd5d1a57ca1d5440593050fdc596d377">
<div></div>
<input type="hidden" name="subject" value="New matrix benchmarks to evaluate ::setConcat implementation options">
<input type="hidden" name="message_only" value="1">
<input type="submit" value="Send Message">
<input type="button" value="Discard" name="discard">
<input type="checkbox" name="send_mail" value="1" id="message-reply-send-mail" checked="checked">
<label>Send mail to reviewers</label>
</form>
</div>
<a id="resizer" class="resizer" style="display:none;cursor:pointer">
<img src="/static/zippyplus.gif">
</a>
</td>
</tr>
</tbody></table>
</div>
<div class="popup" id="popup-issue" style="left: 104px; top: 116px; visibility: hidden; ">
<b>Issue 4571045: New matrix benchmarks to evaluate ::setConcat implementation options
</b><br>
Created 16 minutes ago by me<br>
Modified 0 minutes ago<br>
Reviewers: reed1<br>
Base URL: http://skia.googlecode.com/svn/trunk/<br>
Comments: 0
</div>
<p></p>
<div style="float: left;">
<a target="_blank" href="http://code.google.com/appengine/"><img border="0" src="/static/appengine-noborder-120x30.gif" alt="Powered by Google App Engine"></a>
</div>
<div class="extra" style="font-size: 9pt; float: right; text-align: right;">
<div style="height:14px;">
<img src="/static/rss.gif" alt="RSS Feeds" width="14" height="14" align="top">
<a href="/rss/all">Recent Issues</a>
|
<a href="/rss/mine/TomH">My Issues</a>
|
<a href="/rss/reviews/TomH">My Reviews</a>
|
<a href="/rss/closed/TomH">My Closed</a>
|
<a href="/rss/issue/4571045">This issue</a>
</div>
<div style="margin-top: .3em;">This is Rietveld <a href="http://code.google.com/p/rietveld/updates/list">r756
</a></div>
</div>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script><script src="http://www.google-analytics.com/ga.js" type="text/javascript"></script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-4803694-4");
pageTracker._initData();
pageTracker._trackPageview();
</script>
On platforms that use Float (instead of Fixed), SkMatrix stores its internal
values as floats, but setConcat() needs extra precision and so uses doubles
to contain intermediate values.
These three benchmarks compare the speed of float-only, double-only, and
float-cast-to-double implementations of a chunk of code extracted from the
non-perspective case of setConcat().
git-svn-id: http://skia.googlecode.com/svn/trunk@1497 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-06-03 19:16:56 +00:00
|
|
|
muladdmul(a[3], b[0], a[4], b[3], &r[3]);
|
|
|
|
muladdmul(a[3], b[1], a[4], b[4], &r[4]);
|
|
|
|
muladdmul(a[3], b[2], a[4], b[5], &r[5]);
|
2011-06-03 20:32:58 +00:00
|
|
|
r[5] += a[5];
|
|
|
|
r[6] = r[7] = 0.0;
|
|
|
|
r[8] = 1.0;
|
<body onunload="M_unloadPage();">
<!-- Begin help window -->
<script type="text/javascript"><!--
var xsrfToken = 'dd5d1a57ca1d5440593050fdc596d377';
var helpDisplayed = false;
document.onclick = M_clickCommon;
var media_url = "/static/";
var base_url = "/";
var publish_link = "/4571045/publish";
// -->
</script>
<div id="help" style="display: none;">
<div style="font-size: medium; text-align: center;">Keyboard Shortcuts</div>
<hr>
<table width="100%">
<tbody><tr valign="top">
<td>
<table width="100%">
<tbody><tr>
<td></td><th>File</th>
</tr>
<tr>
<td class="shortcut"><span class="letter">u</span> <b>:</b></td><td>up to issue</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">m</span> <b>:</b></td><td>publish + mail comments</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">M</span> <b>:</b></td><td>edit review message</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">j</span> / <span class="letter">k</span> <b>:</b></td><td>jump to file after / before current file</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">J</span> / <span class="letter">K</span> <b>:</b></td><td>jump to next file with a comment after / before current file</td>
</tr>
<tr>
<td></td><th>Side-by-side diff</th>
</tr>
<tr>
<td class="shortcut"><span class="letter">i</span> <b>:</b></td><td>toggle intra-line diffs</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">e</span> <b>:</b></td><td>expand all comments</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">c</span> <b>:</b></td><td>collapse all comments</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">s</span> <b>:</b></td><td>toggle showing all comments</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">n</span> / <span class="letter">p</span> <b>:</b></td><td>next / previous diff chunk or comment</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">N</span> / <span class="letter">P</span> <b>:</b></td><td>next / previous comment</td>
</tr>
<tr>
<td class="shortcut"><span class="letter"><Enter></span> <b>:</b></td><td>respond to / edit current comment</td>
</tr>
</tbody></table>
</td>
<td>
<table width="100%">
<tbody><tr>
<td></td><th>Issue</th>
</tr>
<tr>
<td class="shortcut"><span class="letter">u</span> <b>:</b></td><td>up to list of issues</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">m</span> <b>:</b></td><td>publish + mail comments</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">j</span> / <span class="letter">k</span> <b>:</b></td><td>jump to patch after / before current patch</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">o</span> / <span class="letter"><Enter></span> <b>:</b></td><td>open current patch in side-by-side view</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">i</span> <b>:</b></td><td>open current patch in unified diff view</td>
</tr>
<tr><td> </td></tr>
<tr><td></td><th>Issue List</th></tr>
<tr>
<td class="shortcut"><span class="letter">j</span> / <span class="letter">k</span> <b>:</b></td><td>jump to issue after / before current issue</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">o</span> / <span class="letter"><Enter></span> <b>:</b></td><td>open current issue</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">#</span> <b>:</b></td>
<td>close issue</td>
</tr>
<tr><td> </td></tr>
<tr>
<td></td><th>Comment/message editing</th>
</tr>
<tr>
<td class="shortcut"><span class="letter"><Ctrl></span> + <span class="letter">s</span> <b>:</b></td><td>save comment</td>
</tr>
<tr>
<td class="shortcut"><span class="letter"><Esc></span> <b>:</b></td><td>cancel edit</td>
</tr>
</tbody></table>
</td>
</tr>
</tbody></table>
</div>
<!-- End help window -->
<div align="right">
<div style="float:left; font-weight:bold"><i>Rietveld</i> Code Review Tool</div>
<b>tomhudson@google.com (TomH)</b>
|
<a class="novisit" href="/settings">Settings</a>
|
<a class="novisit" target="_blank" href="http://code.google.com/p/rietveld/wiki/CodeReviewHelp">Help</a>
|
<a class="novisit" target="_blank" href="http://code.google.com/p/rietveld/issues/list">Bug tracker</a>
|
<a class="novisit" target="_blank" href="http://groups.google.com/group/codereview-discuss">Discussion group</a>
|
<a class="novisit" target="_blank" href="http://code.google.com/p/rietveld">Source code</a>
|
<a class="novisit" href="http://codereview.appspot.com/_ah/logout?continue=https://www.google.com/accounts/Logout%3Fcontinue%3Dhttps://appengine.google.com/_ah/logout%253Fcontinue%253Dhttp://codereview.appspot.com/4571045/%26service%3Dah">Sign out</a>
</div>
<div class="counter">(691)</div>
<div class="mainmenu">
<a href="/" class="active">Issues</a>
<a href="/repos">Repositories</a>
<a href="/search">Search</a>
</div>
<div class="mainmenu2">
<a href="/use_uploadpy">Create Issue</a>
|
<a href="/mine">My Issues</a>
|
<a href="/starred">Starred</a>
|
<a href="/all">Open</a>
|
<a href="/all?closed=1">All</a>
</div>
<div>
<h2>
<span id="issue-star-4571045">
<a href="javascript:M_addIssueStar(4571045)">
<img src="/static/star-dark.gif" width="15" height="15" border="0"></a>
</span>
<span class="issue-close" id="issue-close-4571045">
<a href="javascript:M_closeIssue(4571045)">
<img src="/static/close.gif" title="Close This Issue" width="15" height="15" border="0"></a>
</span>
Issue <a href="/4571045/" onmouseover="M_showPopUp(this, 'popup-issue');">
4571045</a>:
New matrix benchmarks to evaluate ::setConcat implementation options
</h2>
<table class="issue-details" border="0" width="100%">
<tbody><tr valign="top">
<td class="meta" width="20%">
<div>
<a class="novisit" href="/4571045/edit">
Edit Issue
</a>
<br>
<a class="novisit" href="/4571045/publish">
Publish+Mail Comments
</a> ('m')
<br>
<a class="novisit" href="/4571045/diff/1/bench/MatrixBench.cpp">
<b>Start Review</b>
</a>
</div>
<div class="issue_details_sidebar">
<div><b>Created:</b><br>
16 minutes ago by me
</div>
<div><b>Modified:</b><br>
0 minutes ago
</div>
<div><b>Reviewers:</b><br>
<a href="/user/reed1" onmouseover="M_showUserInfoPopup(this)">reed1</a>
</div>
<div><b>CC:</b><br>
</div>
<div><b>Base URL:</b><br>
http://skia.googlecode.com/svn/trunk/
</div>
<div><b>Visibility:</b><br>
Public.
</div>
</div>
</td>
<td style="padding-left: .8em; padding-right: .8em;" width="80%">
<h3><a id="issue-description-pointer" href="javascript:M_toggleSection('issue-description')" class="toggled-section opentriangle">
Description</a></h3>
<div id="issue-description" style="margin-left:15px;">
<pre>On platforms that use Float (instead of Fixed), SkMatrix stores its internal
values as floats, but setConcat() needs extra precision and so uses doubles to
contain intermediate values.
These three benchmarks compare the speed of float-only, double-only, and
float-cast-to-double implementations of a chunk of code extracted from the
non-perspective case of setConcat().
</pre>
</div>
<h3>
<a id="ps-1-pointer" href="javascript:M_toggleSectionForPS('4571045', '1')" class="toggled-section opentriangle">
Patch Set 1
</a>
</h3>
<div id="ps-1" style="">
<div class="issue-list">
<div class="pagination">
<div style="float: left;">
<i>Created:</i> 16 minutes ago
</div>
<div style="float: right;">
<a href="/download/issue4571045_1.diff">
Download raw patch set</a>
</div>
<div style="clear:both;"></div>
</div>
<table id="queues" style="clear:both;">
<tbody><tr align="left">
<th colspan="2"></th>
<th>Unified diffs</th>
<th>Side-by-side diffs</th>
<th>Delta from patch set</th>
<th colspan="3">Stats</th>
<th>Patch</th>
</tr>
<tr name="patch">
<td class="first" width="14"><img src="/static/closedtriangle.gif" style="" width="12" height="9"></td>
<td style="white-space: nowrap">M </td>
<td>
<a class="noul" href="/4571045/patch/1/2">
bench/MatrixBench.cpp
</a>
</td>
<td>
<a class="noul" href="/4571045/diff/1/bench/MatrixBench.cpp">
View
</a>
</td>
<td style="white-space: nowrap">
</td>
<td style="white-space: nowrap">4 chunks</td>
<td style="white-space: nowrap">+114 lines, -3 lines</td>
<td style="white-space: nowrap">
0 comments
</td>
<td>
<a href="/download/issue4571045_1_2.diff" title="Download patch for bench/MatrixBench.cpp">
Download
</a>
</td>
</tr>
</tbody></table>
</div>
</div>
<h3>
<a id="messages-pointer" href="javascript:M_toggleSection('messages')" class="toggled-section opentriangle">
Messages
</a>
</h3>
<div><i>Total messages: 3</i></div>
<div id="messages">
<div style="margin-bottom: .5em;">
<a href="javascript:M_showAllComments('cl', 3)">
Expand All Messages</a>
|
<a href="javascript:M_hideAllComments('cl', 3)">
Collapse All Messages</a>
</div>
<div class="message " id="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UY6QcM" name="0">
<a name="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UY6QcM"></a>
<div class="header">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tbody><tr class="comment_title" onclick="M_switchChangelistComment(0)">
<td style="padding-left: 5px; white-space: nowrap;">
<b>me</b>
</td>
<td width="100%">
<table style="table-layout:fixed; white-space: nowrap;" width="100%">
<tbody><tr>
<td>
<div style="white-space: nowrap; overflow: hidden;" class="extra" id="cl-preview-0">
</div>
</td>
</tr>
</tbody></table>
</td>
<td align="right" style="white-space: nowrap; padding-right: 5px;">
13 minutes ago
</td>
</tr>
</tbody></table>
</div>
<div id="cl-comment-0" style="display: none;">
<div class="message-body">
<pre name="cl-message-0"></pre>
</div>
<div class="message-actions">
<a href="javascript:M_replyToMessage('0', '2011/06/03 18:57:35', 'TomH')" id="message-reply-href-0">Reply</a>
<textarea rows="7" cols="70" name="message" style="display:none"></textarea>
<div id="message-reply-0" style="display:none;"></div>
</div>
</div>
</div>
<div class="message " id="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UY0Q8M" name="1">
<a name="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UY0Q8M"></a>
<div class="header">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tbody><tr class="comment_title" onclick="M_switchChangelistComment(1)">
<td style="padding-left: 5px; white-space: nowrap;">
<b>reed1</b>
</td>
<td width="100%">
<table style="table-layout:fixed; white-space: nowrap;" width="100%">
<tbody><tr>
<td>
<div style="white-space: nowrap; overflow: hidden;" class="extra" id="cl-preview-1">
1. lets remove the "fix" from the function name. just muladdmul I think 2. we ...
</div>
</td>
</tr>
</tbody></table>
</td>
<td align="right" style="white-space: nowrap; padding-right: 5px;">
10 minutes ago
</td>
</tr>
</tbody></table>
</div>
<div id="cl-comment-1" style="display: none;">
<div class="message-body">
<pre name="cl-message-1">1. lets remove the "fix" from the function name. just muladdmul I think
2. we can remove the return, since it will be compiled away anyway
3. nice checkin comment!
4. what are the results like?</pre>
</div>
<div class="message-actions">
<a href="javascript:M_replyToMessage('1', '2011/06/03 19:00:39', 'reed1')" id="message-reply-href-1">Reply</a>
<textarea rows="7" cols="70" name="message" style="display:none"></textarea>
<div id="message-reply-1" style="display:none;"></div>
</div>
</div>
</div>
<div class="message " id="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UYuRcM" name="2">
<a name="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UYuRcM"></a>
<div class="header">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tbody><tr class="comment_title" onclick="M_switchChangelistComment(2)">
<td style="padding-left: 5px; white-space: nowrap;">
<b>me</b>
</td>
<td width="100%">
<table style="table-layout:fixed; white-space: nowrap;" width="100%">
<tbody><tr>
<td>
<div style="white-space: nowrap; overflow: hidden; visibility: hidden;" class="extra" id="cl-preview-2">
> 4. what are the results like? For posterity: tomhudson@tomhudson-zx600-linux:/usr/local/google/src/skia3$ out/bench/bench -match matrix_concat -repeat 1000 ...
</div>
</td>
</tr>
</tbody></table>
</td>
<td align="right" style="white-space: nowrap; padding-right: 5px;">
0 minutes ago
</td>
</tr>
</tbody></table>
</div>
<div id="cl-comment-2">
<div class="message-body">
<pre name="cl-message-2">> 4. what are the results like?
For posterity:
tomhudson@tomhudson-zx600-linux:/usr/local/google/src/skia3$ out/bench/bench
-match matrix_concat -repeat 1000
skia bench: alpha=0xFF antialias=1 filter=0
running bench [640 480] matrix_concat_double 8888: msecs = 0.79 565:
msecs = 0.79 GPU: msecs = 0.79
running bench [640 480] matrix_concat_floatdouble 8888: msecs = 0.97 565:
msecs = 0.97 GPU: msecs = 0.97
running bench [640 480] matrix_concat_float 8888: msecs = 0.74 565:
msecs = 0.73 GPU: msecs = 0.74</pre>
</div>
<div class="message-actions">
<a href="javascript:M_replyToMessage('2', '2011/06/03 19:11:06', 'TomH')" id="message-reply-href-2">Reply</a>
<textarea rows="7" cols="70" name="message" style="display:none"></textarea>
<div id="message-reply-2" style="display:none;"></div>
</div>
</div>
</div>
<div>
<a href="javascript:M_showAllComments('cl', 3)">
Expand All Messages</a>
|
<a href="javascript:M_hideAllComments('cl', 3)">
Collapse All Messages</a>
</div>
</div>
<script language="JavaScript" type="text/javascript">
<!--
document.onkeydown = M_changelistKeyDown;
var dashboardState = new M_DashboardState(window, 'patch', 'M_CLPatchMarker');
M_switchChangelistCommentByAnchor();
// -->
</script>
<div style="display:none;">
<form method="POST" action="/4571045/publish" id="message-reply-form">
<input type="hidden" name="xsrf_token" value="dd5d1a57ca1d5440593050fdc596d377">
<div></div>
<input type="hidden" name="subject" value="New matrix benchmarks to evaluate ::setConcat implementation options">
<input type="hidden" name="message_only" value="1">
<input type="submit" value="Send Message">
<input type="button" value="Discard" name="discard">
<input type="checkbox" name="send_mail" value="1" id="message-reply-send-mail" checked="checked">
<label>Send mail to reviewers</label>
</form>
</div>
<a id="resizer" class="resizer" style="display:none;cursor:pointer">
<img src="/static/zippyplus.gif">
</a>
</td>
</tr>
</tbody></table>
</div>
<div class="popup" id="popup-issue" style="left: 104px; top: 116px; visibility: hidden; ">
<b>Issue 4571045: New matrix benchmarks to evaluate ::setConcat implementation options
</b><br>
Created 16 minutes ago by me<br>
Modified 0 minutes ago<br>
Reviewers: reed1<br>
Base URL: http://skia.googlecode.com/svn/trunk/<br>
Comments: 0
</div>
<p></p>
<div style="float: left;">
<a target="_blank" href="http://code.google.com/appengine/"><img border="0" src="/static/appengine-noborder-120x30.gif" alt="Powered by Google App Engine"></a>
</div>
<div class="extra" style="font-size: 9pt; float: right; text-align: right;">
<div style="height:14px;">
<img src="/static/rss.gif" alt="RSS Feeds" width="14" height="14" align="top">
<a href="/rss/all">Recent Issues</a>
|
<a href="/rss/mine/TomH">My Issues</a>
|
<a href="/rss/reviews/TomH">My Reviews</a>
|
<a href="/rss/closed/TomH">My Closed</a>
|
<a href="/rss/issue/4571045">This issue</a>
</div>
<div style="margin-top: .3em;">This is Rietveld <a href="http://code.google.com/p/rietveld/updates/list">r756
</a></div>
</div>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script><script src="http://www.google-analytics.com/ga.js" type="text/javascript"></script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-4803694-4");
pageTracker._initData();
pageTracker._trackPageview();
</script>
On platforms that use Float (instead of Fixed), SkMatrix stores its internal
values as floats, but setConcat() needs extra precision and so uses doubles
to contain intermediate values.
These three benchmarks compare the speed of float-only, double-only, and
float-cast-to-double implementations of a chunk of code extracted from the
non-perspective case of setConcat().
git-svn-id: http://skia.googlecode.com/svn/trunk@1497 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-06-03 19:16:56 +00:00
|
|
|
}
|
|
|
|
private:
|
2011-06-03 20:32:58 +00:00
|
|
|
double mya [9];
|
|
|
|
double myb [9];
|
|
|
|
double myr [9];
|
<body onunload="M_unloadPage();">
<!-- Begin help window -->
<script type="text/javascript"><!--
var xsrfToken = 'dd5d1a57ca1d5440593050fdc596d377';
var helpDisplayed = false;
document.onclick = M_clickCommon;
var media_url = "/static/";
var base_url = "/";
var publish_link = "/4571045/publish";
// -->
</script>
<div id="help" style="display: none;">
<div style="font-size: medium; text-align: center;">Keyboard Shortcuts</div>
<hr>
<table width="100%">
<tbody><tr valign="top">
<td>
<table width="100%">
<tbody><tr>
<td></td><th>File</th>
</tr>
<tr>
<td class="shortcut"><span class="letter">u</span> <b>:</b></td><td>up to issue</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">m</span> <b>:</b></td><td>publish + mail comments</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">M</span> <b>:</b></td><td>edit review message</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">j</span> / <span class="letter">k</span> <b>:</b></td><td>jump to file after / before current file</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">J</span> / <span class="letter">K</span> <b>:</b></td><td>jump to next file with a comment after / before current file</td>
</tr>
<tr>
<td></td><th>Side-by-side diff</th>
</tr>
<tr>
<td class="shortcut"><span class="letter">i</span> <b>:</b></td><td>toggle intra-line diffs</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">e</span> <b>:</b></td><td>expand all comments</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">c</span> <b>:</b></td><td>collapse all comments</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">s</span> <b>:</b></td><td>toggle showing all comments</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">n</span> / <span class="letter">p</span> <b>:</b></td><td>next / previous diff chunk or comment</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">N</span> / <span class="letter">P</span> <b>:</b></td><td>next / previous comment</td>
</tr>
<tr>
<td class="shortcut"><span class="letter"><Enter></span> <b>:</b></td><td>respond to / edit current comment</td>
</tr>
</tbody></table>
</td>
<td>
<table width="100%">
<tbody><tr>
<td></td><th>Issue</th>
</tr>
<tr>
<td class="shortcut"><span class="letter">u</span> <b>:</b></td><td>up to list of issues</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">m</span> <b>:</b></td><td>publish + mail comments</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">j</span> / <span class="letter">k</span> <b>:</b></td><td>jump to patch after / before current patch</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">o</span> / <span class="letter"><Enter></span> <b>:</b></td><td>open current patch in side-by-side view</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">i</span> <b>:</b></td><td>open current patch in unified diff view</td>
</tr>
<tr><td> </td></tr>
<tr><td></td><th>Issue List</th></tr>
<tr>
<td class="shortcut"><span class="letter">j</span> / <span class="letter">k</span> <b>:</b></td><td>jump to issue after / before current issue</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">o</span> / <span class="letter"><Enter></span> <b>:</b></td><td>open current issue</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">#</span> <b>:</b></td>
<td>close issue</td>
</tr>
<tr><td> </td></tr>
<tr>
<td></td><th>Comment/message editing</th>
</tr>
<tr>
<td class="shortcut"><span class="letter"><Ctrl></span> + <span class="letter">s</span> <b>:</b></td><td>save comment</td>
</tr>
<tr>
<td class="shortcut"><span class="letter"><Esc></span> <b>:</b></td><td>cancel edit</td>
</tr>
</tbody></table>
</td>
</tr>
</tbody></table>
</div>
<!-- End help window -->
<div align="right">
<div style="float:left; font-weight:bold"><i>Rietveld</i> Code Review Tool</div>
<b>tomhudson@google.com (TomH)</b>
|
<a class="novisit" href="/settings">Settings</a>
|
<a class="novisit" target="_blank" href="http://code.google.com/p/rietveld/wiki/CodeReviewHelp">Help</a>
|
<a class="novisit" target="_blank" href="http://code.google.com/p/rietveld/issues/list">Bug tracker</a>
|
<a class="novisit" target="_blank" href="http://groups.google.com/group/codereview-discuss">Discussion group</a>
|
<a class="novisit" target="_blank" href="http://code.google.com/p/rietveld">Source code</a>
|
<a class="novisit" href="http://codereview.appspot.com/_ah/logout?continue=https://www.google.com/accounts/Logout%3Fcontinue%3Dhttps://appengine.google.com/_ah/logout%253Fcontinue%253Dhttp://codereview.appspot.com/4571045/%26service%3Dah">Sign out</a>
</div>
<div class="counter">(691)</div>
<div class="mainmenu">
<a href="/" class="active">Issues</a>
<a href="/repos">Repositories</a>
<a href="/search">Search</a>
</div>
<div class="mainmenu2">
<a href="/use_uploadpy">Create Issue</a>
|
<a href="/mine">My Issues</a>
|
<a href="/starred">Starred</a>
|
<a href="/all">Open</a>
|
<a href="/all?closed=1">All</a>
</div>
<div>
<h2>
<span id="issue-star-4571045">
<a href="javascript:M_addIssueStar(4571045)">
<img src="/static/star-dark.gif" width="15" height="15" border="0"></a>
</span>
<span class="issue-close" id="issue-close-4571045">
<a href="javascript:M_closeIssue(4571045)">
<img src="/static/close.gif" title="Close This Issue" width="15" height="15" border="0"></a>
</span>
Issue <a href="/4571045/" onmouseover="M_showPopUp(this, 'popup-issue');">
4571045</a>:
New matrix benchmarks to evaluate ::setConcat implementation options
</h2>
<table class="issue-details" border="0" width="100%">
<tbody><tr valign="top">
<td class="meta" width="20%">
<div>
<a class="novisit" href="/4571045/edit">
Edit Issue
</a>
<br>
<a class="novisit" href="/4571045/publish">
Publish+Mail Comments
</a> ('m')
<br>
<a class="novisit" href="/4571045/diff/1/bench/MatrixBench.cpp">
<b>Start Review</b>
</a>
</div>
<div class="issue_details_sidebar">
<div><b>Created:</b><br>
16 minutes ago by me
</div>
<div><b>Modified:</b><br>
0 minutes ago
</div>
<div><b>Reviewers:</b><br>
<a href="/user/reed1" onmouseover="M_showUserInfoPopup(this)">reed1</a>
</div>
<div><b>CC:</b><br>
</div>
<div><b>Base URL:</b><br>
http://skia.googlecode.com/svn/trunk/
</div>
<div><b>Visibility:</b><br>
Public.
</div>
</div>
</td>
<td style="padding-left: .8em; padding-right: .8em;" width="80%">
<h3><a id="issue-description-pointer" href="javascript:M_toggleSection('issue-description')" class="toggled-section opentriangle">
Description</a></h3>
<div id="issue-description" style="margin-left:15px;">
<pre>On platforms that use Float (instead of Fixed), SkMatrix stores its internal
values as floats, but setConcat() needs extra precision and so uses doubles to
contain intermediate values.
These three benchmarks compare the speed of float-only, double-only, and
float-cast-to-double implementations of a chunk of code extracted from the
non-perspective case of setConcat().
</pre>
</div>
<h3>
<a id="ps-1-pointer" href="javascript:M_toggleSectionForPS('4571045', '1')" class="toggled-section opentriangle">
Patch Set 1
</a>
</h3>
<div id="ps-1" style="">
<div class="issue-list">
<div class="pagination">
<div style="float: left;">
<i>Created:</i> 16 minutes ago
</div>
<div style="float: right;">
<a href="/download/issue4571045_1.diff">
Download raw patch set</a>
</div>
<div style="clear:both;"></div>
</div>
<table id="queues" style="clear:both;">
<tbody><tr align="left">
<th colspan="2"></th>
<th>Unified diffs</th>
<th>Side-by-side diffs</th>
<th>Delta from patch set</th>
<th colspan="3">Stats</th>
<th>Patch</th>
</tr>
<tr name="patch">
<td class="first" width="14"><img src="/static/closedtriangle.gif" style="" width="12" height="9"></td>
<td style="white-space: nowrap">M </td>
<td>
<a class="noul" href="/4571045/patch/1/2">
bench/MatrixBench.cpp
</a>
</td>
<td>
<a class="noul" href="/4571045/diff/1/bench/MatrixBench.cpp">
View
</a>
</td>
<td style="white-space: nowrap">
</td>
<td style="white-space: nowrap">4 chunks</td>
<td style="white-space: nowrap">+114 lines, -3 lines</td>
<td style="white-space: nowrap">
0 comments
</td>
<td>
<a href="/download/issue4571045_1_2.diff" title="Download patch for bench/MatrixBench.cpp">
Download
</a>
</td>
</tr>
</tbody></table>
</div>
</div>
<h3>
<a id="messages-pointer" href="javascript:M_toggleSection('messages')" class="toggled-section opentriangle">
Messages
</a>
</h3>
<div><i>Total messages: 3</i></div>
<div id="messages">
<div style="margin-bottom: .5em;">
<a href="javascript:M_showAllComments('cl', 3)">
Expand All Messages</a>
|
<a href="javascript:M_hideAllComments('cl', 3)">
Collapse All Messages</a>
</div>
<div class="message " id="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UY6QcM" name="0">
<a name="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UY6QcM"></a>
<div class="header">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tbody><tr class="comment_title" onclick="M_switchChangelistComment(0)">
<td style="padding-left: 5px; white-space: nowrap;">
<b>me</b>
</td>
<td width="100%">
<table style="table-layout:fixed; white-space: nowrap;" width="100%">
<tbody><tr>
<td>
<div style="white-space: nowrap; overflow: hidden;" class="extra" id="cl-preview-0">
</div>
</td>
</tr>
</tbody></table>
</td>
<td align="right" style="white-space: nowrap; padding-right: 5px;">
13 minutes ago
</td>
</tr>
</tbody></table>
</div>
<div id="cl-comment-0" style="display: none;">
<div class="message-body">
<pre name="cl-message-0"></pre>
</div>
<div class="message-actions">
<a href="javascript:M_replyToMessage('0', '2011/06/03 18:57:35', 'TomH')" id="message-reply-href-0">Reply</a>
<textarea rows="7" cols="70" name="message" style="display:none"></textarea>
<div id="message-reply-0" style="display:none;"></div>
</div>
</div>
</div>
<div class="message " id="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UY0Q8M" name="1">
<a name="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UY0Q8M"></a>
<div class="header">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tbody><tr class="comment_title" onclick="M_switchChangelistComment(1)">
<td style="padding-left: 5px; white-space: nowrap;">
<b>reed1</b>
</td>
<td width="100%">
<table style="table-layout:fixed; white-space: nowrap;" width="100%">
<tbody><tr>
<td>
<div style="white-space: nowrap; overflow: hidden;" class="extra" id="cl-preview-1">
1. lets remove the "fix" from the function name. just muladdmul I think 2. we ...
</div>
</td>
</tr>
</tbody></table>
</td>
<td align="right" style="white-space: nowrap; padding-right: 5px;">
10 minutes ago
</td>
</tr>
</tbody></table>
</div>
<div id="cl-comment-1" style="display: none;">
<div class="message-body">
<pre name="cl-message-1">1. lets remove the "fix" from the function name. just muladdmul I think
2. we can remove the return, since it will be compiled away anyway
3. nice checkin comment!
4. what are the results like?</pre>
</div>
<div class="message-actions">
<a href="javascript:M_replyToMessage('1', '2011/06/03 19:00:39', 'reed1')" id="message-reply-href-1">Reply</a>
<textarea rows="7" cols="70" name="message" style="display:none"></textarea>
<div id="message-reply-1" style="display:none;"></div>
</div>
</div>
</div>
<div class="message " id="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UYuRcM" name="2">
<a name="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UYuRcM"></a>
<div class="header">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tbody><tr class="comment_title" onclick="M_switchChangelistComment(2)">
<td style="padding-left: 5px; white-space: nowrap;">
<b>me</b>
</td>
<td width="100%">
<table style="table-layout:fixed; white-space: nowrap;" width="100%">
<tbody><tr>
<td>
<div style="white-space: nowrap; overflow: hidden; visibility: hidden;" class="extra" id="cl-preview-2">
> 4. what are the results like? For posterity: tomhudson@tomhudson-zx600-linux:/usr/local/google/src/skia3$ out/bench/bench -match matrix_concat -repeat 1000 ...
</div>
</td>
</tr>
</tbody></table>
</td>
<td align="right" style="white-space: nowrap; padding-right: 5px;">
0 minutes ago
</td>
</tr>
</tbody></table>
</div>
<div id="cl-comment-2">
<div class="message-body">
<pre name="cl-message-2">> 4. what are the results like?
For posterity:
tomhudson@tomhudson-zx600-linux:/usr/local/google/src/skia3$ out/bench/bench
-match matrix_concat -repeat 1000
skia bench: alpha=0xFF antialias=1 filter=0
running bench [640 480] matrix_concat_double 8888: msecs = 0.79 565:
msecs = 0.79 GPU: msecs = 0.79
running bench [640 480] matrix_concat_floatdouble 8888: msecs = 0.97 565:
msecs = 0.97 GPU: msecs = 0.97
running bench [640 480] matrix_concat_float 8888: msecs = 0.74 565:
msecs = 0.73 GPU: msecs = 0.74</pre>
</div>
<div class="message-actions">
<a href="javascript:M_replyToMessage('2', '2011/06/03 19:11:06', 'TomH')" id="message-reply-href-2">Reply</a>
<textarea rows="7" cols="70" name="message" style="display:none"></textarea>
<div id="message-reply-2" style="display:none;"></div>
</div>
</div>
</div>
<div>
<a href="javascript:M_showAllComments('cl', 3)">
Expand All Messages</a>
|
<a href="javascript:M_hideAllComments('cl', 3)">
Collapse All Messages</a>
</div>
</div>
<script language="JavaScript" type="text/javascript">
<!--
document.onkeydown = M_changelistKeyDown;
var dashboardState = new M_DashboardState(window, 'patch', 'M_CLPatchMarker');
M_switchChangelistCommentByAnchor();
// -->
</script>
<div style="display:none;">
<form method="POST" action="/4571045/publish" id="message-reply-form">
<input type="hidden" name="xsrf_token" value="dd5d1a57ca1d5440593050fdc596d377">
<div></div>
<input type="hidden" name="subject" value="New matrix benchmarks to evaluate ::setConcat implementation options">
<input type="hidden" name="message_only" value="1">
<input type="submit" value="Send Message">
<input type="button" value="Discard" name="discard">
<input type="checkbox" name="send_mail" value="1" id="message-reply-send-mail" checked="checked">
<label>Send mail to reviewers</label>
</form>
</div>
<a id="resizer" class="resizer" style="display:none;cursor:pointer">
<img src="/static/zippyplus.gif">
</a>
</td>
</tr>
</tbody></table>
</div>
<div class="popup" id="popup-issue" style="left: 104px; top: 116px; visibility: hidden; ">
<b>Issue 4571045: New matrix benchmarks to evaluate ::setConcat implementation options
</b><br>
Created 16 minutes ago by me<br>
Modified 0 minutes ago<br>
Reviewers: reed1<br>
Base URL: http://skia.googlecode.com/svn/trunk/<br>
Comments: 0
</div>
<p></p>
<div style="float: left;">
<a target="_blank" href="http://code.google.com/appengine/"><img border="0" src="/static/appengine-noborder-120x30.gif" alt="Powered by Google App Engine"></a>
</div>
<div class="extra" style="font-size: 9pt; float: right; text-align: right;">
<div style="height:14px;">
<img src="/static/rss.gif" alt="RSS Feeds" width="14" height="14" align="top">
<a href="/rss/all">Recent Issues</a>
|
<a href="/rss/mine/TomH">My Issues</a>
|
<a href="/rss/reviews/TomH">My Reviews</a>
|
<a href="/rss/closed/TomH">My Closed</a>
|
<a href="/rss/issue/4571045">This issue</a>
</div>
<div style="margin-top: .3em;">This is Rietveld <a href="http://code.google.com/p/rietveld/updates/list">r756
</a></div>
</div>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script><script src="http://www.google-analytics.com/ga.js" type="text/javascript"></script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-4803694-4");
pageTracker._initData();
pageTracker._trackPageview();
</script>
On platforms that use Float (instead of Fixed), SkMatrix stores its internal
values as floats, but setConcat() needs extra precision and so uses doubles
to contain intermediate values.
These three benchmarks compare the speed of float-only, double-only, and
float-cast-to-double implementations of a chunk of code extracted from the
non-perspective case of setConcat().
git-svn-id: http://skia.googlecode.com/svn/trunk@1497 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-06-03 19:16:56 +00:00
|
|
|
typedef MatrixBench INHERITED;
|
|
|
|
};
|
|
|
|
|
2011-06-24 18:30:49 +00:00
|
|
|
class GetTypeMatrixBench : public MatrixBench {
|
|
|
|
public:
|
|
|
|
GetTypeMatrixBench(void* param)
|
|
|
|
: INHERITED(param, "gettype") {
|
2011-10-24 21:09:40 +00:00
|
|
|
fArray[0] = (float) fRnd.nextS();
|
|
|
|
fArray[1] = (float) fRnd.nextS();
|
|
|
|
fArray[2] = (float) fRnd.nextS();
|
|
|
|
fArray[3] = (float) fRnd.nextS();
|
|
|
|
fArray[4] = (float) fRnd.nextS();
|
|
|
|
fArray[5] = (float) fRnd.nextS();
|
|
|
|
fArray[6] = (float) fRnd.nextS();
|
|
|
|
fArray[7] = (float) fRnd.nextS();
|
|
|
|
fArray[8] = (float) fRnd.nextS();
|
2011-06-24 18:30:49 +00:00
|
|
|
}
|
|
|
|
protected:
|
|
|
|
// Putting random generation of the matrix inside performTest()
|
|
|
|
// would help us avoid anomalous runs, but takes up 25% or
|
|
|
|
// more of the function time.
|
|
|
|
virtual void performTest() {
|
|
|
|
fMatrix.setAll(fArray[0], fArray[1], fArray[2],
|
|
|
|
fArray[3], fArray[4], fArray[5],
|
|
|
|
fArray[6], fArray[7], fArray[8]);
|
|
|
|
always_do(fMatrix.getType());
|
|
|
|
fMatrix.dirtyMatrixTypeCache();
|
|
|
|
always_do(fMatrix.getType());
|
|
|
|
fMatrix.dirtyMatrixTypeCache();
|
|
|
|
always_do(fMatrix.getType());
|
|
|
|
fMatrix.dirtyMatrixTypeCache();
|
|
|
|
always_do(fMatrix.getType());
|
|
|
|
fMatrix.dirtyMatrixTypeCache();
|
|
|
|
always_do(fMatrix.getType());
|
|
|
|
fMatrix.dirtyMatrixTypeCache();
|
|
|
|
always_do(fMatrix.getType());
|
|
|
|
fMatrix.dirtyMatrixTypeCache();
|
|
|
|
always_do(fMatrix.getType());
|
|
|
|
fMatrix.dirtyMatrixTypeCache();
|
|
|
|
always_do(fMatrix.getType());
|
|
|
|
}
|
|
|
|
private:
|
|
|
|
SkMatrix fMatrix;
|
|
|
|
float fArray[9];
|
|
|
|
SkRandom fRnd;
|
|
|
|
typedef MatrixBench INHERITED;
|
|
|
|
};
|
|
|
|
|
2011-06-07 14:31:38 +00:00
|
|
|
class ScaleTransMixedMatrixBench : public MatrixBench {
|
|
|
|
public:
|
2013-04-05 21:13:14 +00:00
|
|
|
ScaleTransMixedMatrixBench(void* p) : INHERITED(p, "scaletrans_mixed") {
|
2011-11-10 13:50:19 +00:00
|
|
|
fMatrix.setAll(fRandom.nextSScalar1(), fRandom.nextSScalar1(), fRandom.nextSScalar1(),
|
|
|
|
fRandom.nextSScalar1(), fRandom.nextSScalar1(), fRandom.nextSScalar1(),
|
|
|
|
fRandom.nextSScalar1(), fRandom.nextSScalar1(), fRandom.nextSScalar1());
|
2011-06-07 14:31:38 +00:00
|
|
|
int i;
|
2013-04-05 21:13:14 +00:00
|
|
|
for (i = 0; i < kCount; i++) {
|
2011-10-24 21:09:40 +00:00
|
|
|
fSrc[i].fX = fRandom.nextSScalar1();
|
|
|
|
fSrc[i].fY = fRandom.nextSScalar1();
|
|
|
|
fDst[i].fX = fRandom.nextSScalar1();
|
|
|
|
fDst[i].fY = fRandom.nextSScalar1();
|
2011-06-07 14:31:38 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
protected:
|
|
|
|
virtual void performTest() {
|
|
|
|
SkPoint* dst = fDst;
|
|
|
|
const SkPoint* src = fSrc;
|
2013-04-05 21:13:14 +00:00
|
|
|
int count = kCount;
|
2011-06-07 14:31:38 +00:00
|
|
|
float mx = fMatrix[SkMatrix::kMScaleX];
|
|
|
|
float my = fMatrix[SkMatrix::kMScaleY];
|
|
|
|
float tx = fMatrix[SkMatrix::kMTransX];
|
|
|
|
float ty = fMatrix[SkMatrix::kMTransY];
|
|
|
|
do {
|
|
|
|
dst->fY = SkScalarMulAdd(src->fY, my, ty);
|
|
|
|
dst->fX = SkScalarMulAdd(src->fX, mx, tx);
|
|
|
|
src += 1;
|
|
|
|
dst += 1;
|
|
|
|
} while (--count);
|
|
|
|
}
|
|
|
|
private:
|
2013-04-05 21:13:14 +00:00
|
|
|
enum {
|
|
|
|
kCount = SkBENCHLOOP(16)
|
|
|
|
};
|
2011-06-07 14:31:38 +00:00
|
|
|
SkMatrix fMatrix;
|
|
|
|
SkPoint fSrc [16];
|
|
|
|
SkPoint fDst [16];
|
|
|
|
SkRandom fRandom;
|
|
|
|
typedef MatrixBench INHERITED;
|
|
|
|
};
|
|
|
|
|
|
|
|
class ScaleTransDoubleMatrixBench : public MatrixBench {
|
|
|
|
public:
|
2013-04-05 21:13:14 +00:00
|
|
|
ScaleTransDoubleMatrixBench(void* p) : INHERITED(p, "scaletrans_double") {
|
2011-06-07 14:31:38 +00:00
|
|
|
init9(fMatrix);
|
|
|
|
int i;
|
2013-04-05 21:13:14 +00:00
|
|
|
for (i = 0; i < kCount; i++) {
|
2011-10-24 21:09:40 +00:00
|
|
|
fSrc[i].fX = fRandom.nextSScalar1();
|
|
|
|
fSrc[i].fY = fRandom.nextSScalar1();
|
|
|
|
fDst[i].fX = fRandom.nextSScalar1();
|
|
|
|
fDst[i].fY = fRandom.nextSScalar1();
|
2011-06-07 14:31:38 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
protected:
|
|
|
|
virtual void performTest() {
|
|
|
|
SkPoint* dst = fDst;
|
|
|
|
const SkPoint* src = fSrc;
|
2013-04-05 21:13:14 +00:00
|
|
|
int count = kCount;
|
2011-06-07 14:31:38 +00:00
|
|
|
// As doubles, on Z600 Linux systems this is 2.5x as expensive as mixed mode
|
2011-10-24 21:09:40 +00:00
|
|
|
float mx = (float) fMatrix[SkMatrix::kMScaleX];
|
|
|
|
float my = (float) fMatrix[SkMatrix::kMScaleY];
|
|
|
|
float tx = (float) fMatrix[SkMatrix::kMTransX];
|
|
|
|
float ty = (float) fMatrix[SkMatrix::kMTransY];
|
2011-06-07 14:31:38 +00:00
|
|
|
do {
|
|
|
|
dst->fY = src->fY * my + ty;
|
|
|
|
dst->fX = src->fX * mx + tx;
|
|
|
|
src += 1;
|
|
|
|
dst += 1;
|
|
|
|
} while (--count);
|
|
|
|
}
|
|
|
|
private:
|
2013-04-05 21:13:14 +00:00
|
|
|
enum {
|
|
|
|
kCount = SkBENCHLOOP(16)
|
|
|
|
};
|
2011-06-07 14:31:38 +00:00
|
|
|
double fMatrix [9];
|
|
|
|
SkPoint fSrc [16];
|
|
|
|
SkPoint fDst [16];
|
|
|
|
SkRandom fRandom;
|
|
|
|
typedef MatrixBench INHERITED;
|
|
|
|
};
|
|
|
|
|
2012-07-12 14:01:32 +00:00
|
|
|
class InvertMapRectMatrixBench : public MatrixBench {
|
|
|
|
public:
|
2012-08-23 18:09:54 +00:00
|
|
|
InvertMapRectMatrixBench(void* param, const char* name, int flags)
|
2012-07-12 14:01:32 +00:00
|
|
|
: INHERITED(param, name)
|
|
|
|
, fFlags(flags) {
|
|
|
|
fMatrix.reset();
|
|
|
|
fIteration = 0;
|
|
|
|
if (flags & kScale_Flag) {
|
|
|
|
fMatrix.postScale(SkFloatToScalar(1.5f), SkFloatToScalar(2.5f));
|
|
|
|
}
|
|
|
|
if (flags & kTranslate_Flag) {
|
|
|
|
fMatrix.postTranslate(SkFloatToScalar(1.5f), SkFloatToScalar(2.5f));
|
|
|
|
}
|
|
|
|
if (flags & kRotate_Flag) {
|
|
|
|
fMatrix.postRotate(SkFloatToScalar(45.0f));
|
|
|
|
}
|
|
|
|
if (flags & kPerspective_Flag) {
|
|
|
|
fMatrix.setPerspX(SkFloatToScalar(1.5f));
|
|
|
|
fMatrix.setPerspY(SkFloatToScalar(2.5f));
|
|
|
|
}
|
|
|
|
if (0 == (flags & kUncachedTypeMask_Flag)) {
|
|
|
|
fMatrix.getType();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
enum Flag {
|
|
|
|
kScale_Flag = 0x01,
|
|
|
|
kTranslate_Flag = 0x02,
|
|
|
|
kRotate_Flag = 0x04,
|
|
|
|
kPerspective_Flag = 0x08,
|
|
|
|
kUncachedTypeMask_Flag = 0x10,
|
|
|
|
};
|
|
|
|
protected:
|
|
|
|
virtual void performTest() {
|
|
|
|
if (fFlags & kUncachedTypeMask_Flag) {
|
|
|
|
// This will invalidate the typemask without
|
|
|
|
// changing the matrix.
|
|
|
|
fMatrix.setPerspX(fMatrix.getPerspX());
|
|
|
|
}
|
|
|
|
SkMatrix inv;
|
2012-09-17 13:36:47 +00:00
|
|
|
bool invertible = fMatrix.invert(&inv);
|
2012-07-12 14:01:32 +00:00
|
|
|
SkASSERT(invertible);
|
|
|
|
SkRect transformedRect;
|
2012-09-17 13:36:47 +00:00
|
|
|
// an arbitrary, small, non-zero rect to transform
|
|
|
|
SkRect srcRect = SkRect::MakeWH(SkIntToScalar(10), SkIntToScalar(10));
|
2012-07-12 14:01:32 +00:00
|
|
|
if (invertible) {
|
2012-09-17 13:36:47 +00:00
|
|
|
inv.mapRect(&transformedRect, srcRect);
|
2012-07-12 14:01:32 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
private:
|
|
|
|
SkMatrix fMatrix;
|
|
|
|
int fFlags;
|
|
|
|
unsigned fIteration;
|
|
|
|
typedef MatrixBench INHERITED;
|
|
|
|
};
|
2011-06-07 14:31:38 +00:00
|
|
|
|
2013-01-04 14:04:08 +00:00
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
2011-06-07 14:31:38 +00:00
|
|
|
|
2013-01-04 14:04:08 +00:00
|
|
|
DEF_BENCH( return new EqualsMatrixBench(p); )
|
|
|
|
DEF_BENCH( return new ScaleMatrixBench(p); )
|
|
|
|
DEF_BENCH( return new FloatConcatMatrixBench(p); )
|
|
|
|
DEF_BENCH( return new FloatDoubleConcatMatrixBench(p); )
|
|
|
|
DEF_BENCH( return new DoubleConcatMatrixBench(p); )
|
|
|
|
DEF_BENCH( return new GetTypeMatrixBench(p); )
|
|
|
|
DEF_BENCH( return new InvertMapRectMatrixBench(p, "invert_maprect_identity", 0); )
|
2011-06-07 14:31:38 +00:00
|
|
|
|
2013-01-04 14:04:08 +00:00
|
|
|
DEF_BENCH(return new InvertMapRectMatrixBench(p,
|
2013-01-04 15:46:42 +00:00
|
|
|
"invert_maprect_rectstaysrect",
|
|
|
|
InvertMapRectMatrixBench::kScale_Flag |
|
|
|
|
InvertMapRectMatrixBench::kTranslate_Flag); )
|
|
|
|
|
|
|
|
DEF_BENCH(return new InvertMapRectMatrixBench(p,
|
|
|
|
"invert_maprect_translate",
|
|
|
|
InvertMapRectMatrixBench::kTranslate_Flag); )
|
<body onunload="M_unloadPage();">
<!-- Begin help window -->
<script type="text/javascript"><!--
var xsrfToken = 'dd5d1a57ca1d5440593050fdc596d377';
var helpDisplayed = false;
document.onclick = M_clickCommon;
var media_url = "/static/";
var base_url = "/";
var publish_link = "/4571045/publish";
// -->
</script>
<div id="help" style="display: none;">
<div style="font-size: medium; text-align: center;">Keyboard Shortcuts</div>
<hr>
<table width="100%">
<tbody><tr valign="top">
<td>
<table width="100%">
<tbody><tr>
<td></td><th>File</th>
</tr>
<tr>
<td class="shortcut"><span class="letter">u</span> <b>:</b></td><td>up to issue</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">m</span> <b>:</b></td><td>publish + mail comments</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">M</span> <b>:</b></td><td>edit review message</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">j</span> / <span class="letter">k</span> <b>:</b></td><td>jump to file after / before current file</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">J</span> / <span class="letter">K</span> <b>:</b></td><td>jump to next file with a comment after / before current file</td>
</tr>
<tr>
<td></td><th>Side-by-side diff</th>
</tr>
<tr>
<td class="shortcut"><span class="letter">i</span> <b>:</b></td><td>toggle intra-line diffs</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">e</span> <b>:</b></td><td>expand all comments</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">c</span> <b>:</b></td><td>collapse all comments</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">s</span> <b>:</b></td><td>toggle showing all comments</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">n</span> / <span class="letter">p</span> <b>:</b></td><td>next / previous diff chunk or comment</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">N</span> / <span class="letter">P</span> <b>:</b></td><td>next / previous comment</td>
</tr>
<tr>
<td class="shortcut"><span class="letter"><Enter></span> <b>:</b></td><td>respond to / edit current comment</td>
</tr>
</tbody></table>
</td>
<td>
<table width="100%">
<tbody><tr>
<td></td><th>Issue</th>
</tr>
<tr>
<td class="shortcut"><span class="letter">u</span> <b>:</b></td><td>up to list of issues</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">m</span> <b>:</b></td><td>publish + mail comments</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">j</span> / <span class="letter">k</span> <b>:</b></td><td>jump to patch after / before current patch</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">o</span> / <span class="letter"><Enter></span> <b>:</b></td><td>open current patch in side-by-side view</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">i</span> <b>:</b></td><td>open current patch in unified diff view</td>
</tr>
<tr><td> </td></tr>
<tr><td></td><th>Issue List</th></tr>
<tr>
<td class="shortcut"><span class="letter">j</span> / <span class="letter">k</span> <b>:</b></td><td>jump to issue after / before current issue</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">o</span> / <span class="letter"><Enter></span> <b>:</b></td><td>open current issue</td>
</tr>
<tr>
<td class="shortcut"><span class="letter">#</span> <b>:</b></td>
<td>close issue</td>
</tr>
<tr><td> </td></tr>
<tr>
<td></td><th>Comment/message editing</th>
</tr>
<tr>
<td class="shortcut"><span class="letter"><Ctrl></span> + <span class="letter">s</span> <b>:</b></td><td>save comment</td>
</tr>
<tr>
<td class="shortcut"><span class="letter"><Esc></span> <b>:</b></td><td>cancel edit</td>
</tr>
</tbody></table>
</td>
</tr>
</tbody></table>
</div>
<!-- End help window -->
<div align="right">
<div style="float:left; font-weight:bold"><i>Rietveld</i> Code Review Tool</div>
<b>tomhudson@google.com (TomH)</b>
|
<a class="novisit" href="/settings">Settings</a>
|
<a class="novisit" target="_blank" href="http://code.google.com/p/rietveld/wiki/CodeReviewHelp">Help</a>
|
<a class="novisit" target="_blank" href="http://code.google.com/p/rietveld/issues/list">Bug tracker</a>
|
<a class="novisit" target="_blank" href="http://groups.google.com/group/codereview-discuss">Discussion group</a>
|
<a class="novisit" target="_blank" href="http://code.google.com/p/rietveld">Source code</a>
|
<a class="novisit" href="http://codereview.appspot.com/_ah/logout?continue=https://www.google.com/accounts/Logout%3Fcontinue%3Dhttps://appengine.google.com/_ah/logout%253Fcontinue%253Dhttp://codereview.appspot.com/4571045/%26service%3Dah">Sign out</a>
</div>
<div class="counter">(691)</div>
<div class="mainmenu">
<a href="/" class="active">Issues</a>
<a href="/repos">Repositories</a>
<a href="/search">Search</a>
</div>
<div class="mainmenu2">
<a href="/use_uploadpy">Create Issue</a>
|
<a href="/mine">My Issues</a>
|
<a href="/starred">Starred</a>
|
<a href="/all">Open</a>
|
<a href="/all?closed=1">All</a>
</div>
<div>
<h2>
<span id="issue-star-4571045">
<a href="javascript:M_addIssueStar(4571045)">
<img src="/static/star-dark.gif" width="15" height="15" border="0"></a>
</span>
<span class="issue-close" id="issue-close-4571045">
<a href="javascript:M_closeIssue(4571045)">
<img src="/static/close.gif" title="Close This Issue" width="15" height="15" border="0"></a>
</span>
Issue <a href="/4571045/" onmouseover="M_showPopUp(this, 'popup-issue');">
4571045</a>:
New matrix benchmarks to evaluate ::setConcat implementation options
</h2>
<table class="issue-details" border="0" width="100%">
<tbody><tr valign="top">
<td class="meta" width="20%">
<div>
<a class="novisit" href="/4571045/edit">
Edit Issue
</a>
<br>
<a class="novisit" href="/4571045/publish">
Publish+Mail Comments
</a> ('m')
<br>
<a class="novisit" href="/4571045/diff/1/bench/MatrixBench.cpp">
<b>Start Review</b>
</a>
</div>
<div class="issue_details_sidebar">
<div><b>Created:</b><br>
16 minutes ago by me
</div>
<div><b>Modified:</b><br>
0 minutes ago
</div>
<div><b>Reviewers:</b><br>
<a href="/user/reed1" onmouseover="M_showUserInfoPopup(this)">reed1</a>
</div>
<div><b>CC:</b><br>
</div>
<div><b>Base URL:</b><br>
http://skia.googlecode.com/svn/trunk/
</div>
<div><b>Visibility:</b><br>
Public.
</div>
</div>
</td>
<td style="padding-left: .8em; padding-right: .8em;" width="80%">
<h3><a id="issue-description-pointer" href="javascript:M_toggleSection('issue-description')" class="toggled-section opentriangle">
Description</a></h3>
<div id="issue-description" style="margin-left:15px;">
<pre>On platforms that use Float (instead of Fixed), SkMatrix stores its internal
values as floats, but setConcat() needs extra precision and so uses doubles to
contain intermediate values.
These three benchmarks compare the speed of float-only, double-only, and
float-cast-to-double implementations of a chunk of code extracted from the
non-perspective case of setConcat().
</pre>
</div>
<h3>
<a id="ps-1-pointer" href="javascript:M_toggleSectionForPS('4571045', '1')" class="toggled-section opentriangle">
Patch Set 1
</a>
</h3>
<div id="ps-1" style="">
<div class="issue-list">
<div class="pagination">
<div style="float: left;">
<i>Created:</i> 16 minutes ago
</div>
<div style="float: right;">
<a href="/download/issue4571045_1.diff">
Download raw patch set</a>
</div>
<div style="clear:both;"></div>
</div>
<table id="queues" style="clear:both;">
<tbody><tr align="left">
<th colspan="2"></th>
<th>Unified diffs</th>
<th>Side-by-side diffs</th>
<th>Delta from patch set</th>
<th colspan="3">Stats</th>
<th>Patch</th>
</tr>
<tr name="patch">
<td class="first" width="14"><img src="/static/closedtriangle.gif" style="" width="12" height="9"></td>
<td style="white-space: nowrap">M </td>
<td>
<a class="noul" href="/4571045/patch/1/2">
bench/MatrixBench.cpp
</a>
</td>
<td>
<a class="noul" href="/4571045/diff/1/bench/MatrixBench.cpp">
View
</a>
</td>
<td style="white-space: nowrap">
</td>
<td style="white-space: nowrap">4 chunks</td>
<td style="white-space: nowrap">+114 lines, -3 lines</td>
<td style="white-space: nowrap">
0 comments
</td>
<td>
<a href="/download/issue4571045_1_2.diff" title="Download patch for bench/MatrixBench.cpp">
Download
</a>
</td>
</tr>
</tbody></table>
</div>
</div>
<h3>
<a id="messages-pointer" href="javascript:M_toggleSection('messages')" class="toggled-section opentriangle">
Messages
</a>
</h3>
<div><i>Total messages: 3</i></div>
<div id="messages">
<div style="margin-bottom: .5em;">
<a href="javascript:M_showAllComments('cl', 3)">
Expand All Messages</a>
|
<a href="javascript:M_hideAllComments('cl', 3)">
Collapse All Messages</a>
</div>
<div class="message " id="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UY6QcM" name="0">
<a name="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UY6QcM"></a>
<div class="header">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tbody><tr class="comment_title" onclick="M_switchChangelistComment(0)">
<td style="padding-left: 5px; white-space: nowrap;">
<b>me</b>
</td>
<td width="100%">
<table style="table-layout:fixed; white-space: nowrap;" width="100%">
<tbody><tr>
<td>
<div style="white-space: nowrap; overflow: hidden;" class="extra" id="cl-preview-0">
</div>
</td>
</tr>
</tbody></table>
</td>
<td align="right" style="white-space: nowrap; padding-right: 5px;">
13 minutes ago
</td>
</tr>
</tbody></table>
</div>
<div id="cl-comment-0" style="display: none;">
<div class="message-body">
<pre name="cl-message-0"></pre>
</div>
<div class="message-actions">
<a href="javascript:M_replyToMessage('0', '2011/06/03 18:57:35', 'TomH')" id="message-reply-href-0">Reply</a>
<textarea rows="7" cols="70" name="message" style="display:none"></textarea>
<div id="message-reply-0" style="display:none;"></div>
</div>
</div>
</div>
<div class="message " id="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UY0Q8M" name="1">
<a name="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UY0Q8M"></a>
<div class="header">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tbody><tr class="comment_title" onclick="M_switchChangelistComment(1)">
<td style="padding-left: 5px; white-space: nowrap;">
<b>reed1</b>
</td>
<td width="100%">
<table style="table-layout:fixed; white-space: nowrap;" width="100%">
<tbody><tr>
<td>
<div style="white-space: nowrap; overflow: hidden;" class="extra" id="cl-preview-1">
1. lets remove the "fix" from the function name. just muladdmul I think 2. we ...
</div>
</td>
</tr>
</tbody></table>
</td>
<td align="right" style="white-space: nowrap; padding-right: 5px;">
10 minutes ago
</td>
</tr>
</tbody></table>
</div>
<div id="cl-comment-1" style="display: none;">
<div class="message-body">
<pre name="cl-message-1">1. lets remove the "fix" from the function name. just muladdmul I think
2. we can remove the return, since it will be compiled away anyway
3. nice checkin comment!
4. what are the results like?</pre>
</div>
<div class="message-actions">
<a href="javascript:M_replyToMessage('1', '2011/06/03 19:00:39', 'reed1')" id="message-reply-href-1">Reply</a>
<textarea rows="7" cols="70" name="message" style="display:none"></textarea>
<div id="message-reply-1" style="display:none;"></div>
</div>
</div>
</div>
<div class="message " id="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UYuRcM" name="2">
<a name="msg-agpjb2RlcmV2aWV3chwLEgVJc3N1ZRil_5YCDAsSB01lc3NhZ2UYuRcM"></a>
<div class="header">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tbody><tr class="comment_title" onclick="M_switchChangelistComment(2)">
<td style="padding-left: 5px; white-space: nowrap;">
<b>me</b>
</td>
<td width="100%">
<table style="table-layout:fixed; white-space: nowrap;" width="100%">
<tbody><tr>
<td>
<div style="white-space: nowrap; overflow: hidden; visibility: hidden;" class="extra" id="cl-preview-2">
> 4. what are the results like? For posterity: tomhudson@tomhudson-zx600-linux:/usr/local/google/src/skia3$ out/bench/bench -match matrix_concat -repeat 1000 ...
</div>
</td>
</tr>
</tbody></table>
</td>
<td align="right" style="white-space: nowrap; padding-right: 5px;">
0 minutes ago
</td>
</tr>
</tbody></table>
</div>
<div id="cl-comment-2">
<div class="message-body">
<pre name="cl-message-2">> 4. what are the results like?
For posterity:
tomhudson@tomhudson-zx600-linux:/usr/local/google/src/skia3$ out/bench/bench
-match matrix_concat -repeat 1000
skia bench: alpha=0xFF antialias=1 filter=0
running bench [640 480] matrix_concat_double 8888: msecs = 0.79 565:
msecs = 0.79 GPU: msecs = 0.79
running bench [640 480] matrix_concat_floatdouble 8888: msecs = 0.97 565:
msecs = 0.97 GPU: msecs = 0.97
running bench [640 480] matrix_concat_float 8888: msecs = 0.74 565:
msecs = 0.73 GPU: msecs = 0.74</pre>
</div>
<div class="message-actions">
<a href="javascript:M_replyToMessage('2', '2011/06/03 19:11:06', 'TomH')" id="message-reply-href-2">Reply</a>
<textarea rows="7" cols="70" name="message" style="display:none"></textarea>
<div id="message-reply-2" style="display:none;"></div>
</div>
</div>
</div>
<div>
<a href="javascript:M_showAllComments('cl', 3)">
Expand All Messages</a>
|
<a href="javascript:M_hideAllComments('cl', 3)">
Collapse All Messages</a>
</div>
</div>
<script language="JavaScript" type="text/javascript">
<!--
document.onkeydown = M_changelistKeyDown;
var dashboardState = new M_DashboardState(window, 'patch', 'M_CLPatchMarker');
M_switchChangelistCommentByAnchor();
// -->
</script>
<div style="display:none;">
<form method="POST" action="/4571045/publish" id="message-reply-form">
<input type="hidden" name="xsrf_token" value="dd5d1a57ca1d5440593050fdc596d377">
<div></div>
<input type="hidden" name="subject" value="New matrix benchmarks to evaluate ::setConcat implementation options">
<input type="hidden" name="message_only" value="1">
<input type="submit" value="Send Message">
<input type="button" value="Discard" name="discard">
<input type="checkbox" name="send_mail" value="1" id="message-reply-send-mail" checked="checked">
<label>Send mail to reviewers</label>
</form>
</div>
<a id="resizer" class="resizer" style="display:none;cursor:pointer">
<img src="/static/zippyplus.gif">
</a>
</td>
</tr>
</tbody></table>
</div>
<div class="popup" id="popup-issue" style="left: 104px; top: 116px; visibility: hidden; ">
<b>Issue 4571045: New matrix benchmarks to evaluate ::setConcat implementation options
</b><br>
Created 16 minutes ago by me<br>
Modified 0 minutes ago<br>
Reviewers: reed1<br>
Base URL: http://skia.googlecode.com/svn/trunk/<br>
Comments: 0
</div>
<p></p>
<div style="float: left;">
<a target="_blank" href="http://code.google.com/appengine/"><img border="0" src="/static/appengine-noborder-120x30.gif" alt="Powered by Google App Engine"></a>
</div>
<div class="extra" style="font-size: 9pt; float: right; text-align: right;">
<div style="height:14px;">
<img src="/static/rss.gif" alt="RSS Feeds" width="14" height="14" align="top">
<a href="/rss/all">Recent Issues</a>
|
<a href="/rss/mine/TomH">My Issues</a>
|
<a href="/rss/reviews/TomH">My Reviews</a>
|
<a href="/rss/closed/TomH">My Closed</a>
|
<a href="/rss/issue/4571045">This issue</a>
</div>
<div style="margin-top: .3em;">This is Rietveld <a href="http://code.google.com/p/rietveld/updates/list">r756
</a></div>
</div>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script><script src="http://www.google-analytics.com/ga.js" type="text/javascript"></script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-4803694-4");
pageTracker._initData();
pageTracker._trackPageview();
</script>
On platforms that use Float (instead of Fixed), SkMatrix stores its internal
values as floats, but setConcat() needs extra precision and so uses doubles
to contain intermediate values.
These three benchmarks compare the speed of float-only, double-only, and
float-cast-to-double implementations of a chunk of code extracted from the
non-perspective case of setConcat().
git-svn-id: http://skia.googlecode.com/svn/trunk@1497 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-06-03 19:16:56 +00:00
|
|
|
|
2013-01-04 14:04:08 +00:00
|
|
|
DEF_BENCH(return new InvertMapRectMatrixBench(p,
|
|
|
|
"invert_maprect_nonpersp",
|
|
|
|
InvertMapRectMatrixBench::kScale_Flag |
|
|
|
|
InvertMapRectMatrixBench::kRotate_Flag |
|
|
|
|
InvertMapRectMatrixBench::kTranslate_Flag); )
|
|
|
|
|
|
|
|
DEF_BENCH( return new InvertMapRectMatrixBench(p,
|
|
|
|
"invert_maprect_persp",
|
|
|
|
InvertMapRectMatrixBench::kPerspective_Flag); )
|
|
|
|
|
|
|
|
DEF_BENCH( return new InvertMapRectMatrixBench(p,
|
|
|
|
"invert_maprect_typemask_rectstaysrect",
|
|
|
|
InvertMapRectMatrixBench::kUncachedTypeMask_Flag |
|
|
|
|
InvertMapRectMatrixBench::kScale_Flag |
|
|
|
|
InvertMapRectMatrixBench::kTranslate_Flag); )
|
|
|
|
|
|
|
|
DEF_BENCH( return new InvertMapRectMatrixBench(p,
|
|
|
|
"invert_maprect_typemask_nonpersp",
|
|
|
|
InvertMapRectMatrixBench::kUncachedTypeMask_Flag |
|
|
|
|
InvertMapRectMatrixBench::kScale_Flag |
|
|
|
|
InvertMapRectMatrixBench::kRotate_Flag |
|
|
|
|
InvertMapRectMatrixBench::kTranslate_Flag); )
|
2011-06-01 15:11:22 +00:00
|
|
|
|
2013-01-04 14:04:08 +00:00
|
|
|
DEF_BENCH( return new ScaleTransMixedMatrixBench(p); )
|
|
|
|
DEF_BENCH( return new ScaleTransDoubleMatrixBench(p); )
|