Patch by Oliver Varga <Varga.Oliver@stud.u-szeged.hu> on 2011-07-12
authorreni@webkit.org <reni@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 12 Jul 2011 10:14:30 +0000 (10:14 +0000)
committerreni@webkit.org <reni@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 12 Jul 2011 10:14:30 +0000 (10:14 +0000)
commitef68cd6ac5335d7a816d524162d1f0cc75d574b9
tree695b79ba6d42bc10dc5d256a161db96ffd67ed1a
parent79315694d7a12269427b92c4167f22abf707b0b5
Patch by Oliver Varga <Varga.Oliver@stud.u-szeged.hu> on 2011-07-12
Reviewed by Nikolas Zimmermann.

Speed up SVGSMILElement::findInstanceTime.
https://bugs.webkit.org/show_bug.cgi?id=61025

Source/JavaScriptCore:

Add a new parameter to StdlibExtras.h::binarySerarch function
to also handle cases when the array does not contain the key value.
This is needed for an svg function.

* wtf/StdLibExtras.h:
(WTF::binarySearch):

Source/WebCore:

Replace the linear search to binary search on ordered list because
the previous searches from the beginning was not efficient.
Out of index error fixed by Renata Hodovan.

No new tests this is only a performance tweak.

* svg/animation/SVGSMILElement.cpp:
(WebCore::extractTimeFromVector):
(WebCore::SVGSMILElement::findInstanceTime):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@90811 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/wtf/StdLibExtras.h
Source/WebCore/ChangeLog
Source/WebCore/svg/animation/SVGSMILElement.cpp