Smaller is better, winner of each group marked with *:
* 0.81 sort_stdsort_repeated
2.60 sort_qsort_repeated
11.06 sort_skheap_repeated
15.81 sort_skqsort_repeated
* 1.76 sort_stdsort_backward
23.17 sort_qsort_backward
14.32 sort_skheap_backward
7.06 sort_skqsort_backward
* 0.78 sort_stdsort_forward
4.00 sort_qsort_forward
15.19 sort_skheap_forward
2.76 sort_skqsort_forward
13.47 sort_stdsort_rand10
27.71 sort_qsort_rand10
15.80 sort_skheap_rand10
* 11.11 sort_skqsort_rand10
17.94 sort_stdsort_rand
48.69 sort_qsort_rand
16.52 sort_skheap_rand
* 11.98 sort_skqsort_rand
libc++ must special case repeated, forward, and backward sorted data?
To reproduce, run this and ignore (unrelated) sort_topo_rand:
$ ninja -C out nanobench; and out/nanobench -m sort_ -q
Change-Id: I3724188f2a6acac61d9e8c2bd43443792e0ae0ce
Reviewed-on: https://skia-review.googlesource.com/131156
Commit-Queue: Mike Klein <mtklein@chromium.org>
Commit-Queue: Ben Wagner <bungeman@google.com>
Auto-Submit: Mike Klein <mtklein@chromium.org>
Reviewed-by: Ben Wagner <bungeman@google.com>
GLBenches do not expect gl state to change between onPerCanvasPreDraw and *PostDraw, but we do a clear and sometimes we clear as draw. This causes us to bind vertex objects / programs / etc.
This change creates two new virtual methods which are called right before and immediately after timing.
BUG=skia:
Review URL: https://codereview.chromium.org/1379853003
Unfortunately, immintrin.h (which is also included by SkTypes)
includes xmmintrin.h which includes mm_malloc.h which includes
stdlib.h for malloc even though, from the implementation, it is
difficult to see why.
Fortunately, arm_neon.h does not seem to be involved in such
shenanigans, so building for Android will keep things sane.
TBR=reed@google.com
Doesn't change Skia API, just moves an include.
Review URL: https://codereview.chromium.org/1313203003
This fixes every case where virtual and SK_OVERRIDE were on the same line,
which should be the bulk of cases. We'll have to manually clean up the rest
over time unless I level up in regexes.
for f in (find . -type f); perl -p -i -e 's/virtual (.*)SK_OVERRIDE/\1SK_OVERRIDE/g' $f; end
BUG=skia:
Review URL: https://codereview.chromium.org/806653007
I'm not quite sure why I wrote such a convoluted API with setLoops()/getLoops().
This replaces it with a loops argument passed to onDraw().
This CL is largely mechanical translation from the old API to the new one.
MathBench used this->getLoops() outside onDraw(), which seems incorrect. I
fixed it.
BUG=
R=djsollen@google.com
Author: mtklein@google.com
Review URL: https://codereview.chromium.org/99893003
git-svn-id: http://skia.googlecode.com/svn/trunk@12466 2bbb7eff-a529-9590-31e7-b0007b416f81
Adds "grresourcecache_add" and "grresourcecache_find" bench tests to test
GrResourceCache::add and GrResourceCache::find. The tests work only
with GPU backends, since GrResourceCache needs an GrGpu.
Modifies bench tests to override SkBenchmark::isSuitableFor(Backend)
function that specifies what kind of backend the test is inteded
for. This replaces the previous "fIsRendering" flag that would
indicate test that did no rendering.
Adds SkCanvas::getGrContext() call to get the GrContext that the
canvas ends up drawing to. The member function solves a common
use-case that is also used in the benchmark added here.
R=mtklein@google.com, bsalomon@google.com
Author: kkinnunen@nvidia.com
Review URL: https://codereview.chromium.org/73643005
git-svn-id: http://skia.googlecode.com/svn/trunk@12334 2bbb7eff-a529-9590-31e7-b0007b416f81
due to (1) SkTQSort's bad behavior on repeated-keys, and (2) windows-debug doesn't
implement tail-recursion.
Not an issue, since we don't care about perf in our debug builds anyway.
git-svn-id: http://skia.googlecode.com/svn/trunk@7396 2bbb7eff-a529-9590-31e7-b0007b416f81