haikuwebkit/PerformanceTests/Bindings/typed-array-construct-from-...

17 lines
307 B
HTML
Raw Permalink Normal View History

use createUninitialized when creating TypedArray from another array https://bugs.webkit.org/show_bug.cgi?id=92518 Patch by Arnaud Renevier <a.renevier@sisa.samsung.com> on 2012-07-27 Reviewed by Kenneth Russell. PerformanceTests: * Bindings/typed-array-construct-from-array.html: Added. Source/WebCore: When creating a Typed Array from another array, we fill it with values from the source array. So, we can create it uninitialized. This is make constructor about 35% faster when constructed with another typed array. Test: fast/canvas/webgl/array-constructor.html * bindings/js/JSArrayBufferViewHelper.h: (WebCore::constructArrayBufferViewWithTypedArrayArgument): (WebCore::constructArrayBufferView): Source/WTF: Expose a createUninitialized static method on TypedArray classes. * wtf/Float32Array.h: (Float32Array): (WTF::Float32Array::createUninitialized): (WTF): * wtf/Float64Array.h: (Float64Array): (WTF::Float64Array::createUninitialized): (WTF): * wtf/Int16Array.h: (Int16Array): (WTF::Int16Array::createUninitialized): (WTF): * wtf/Int32Array.h: (Int32Array): (WTF::Int32Array::createUninitialized): (WTF): * wtf/Int8Array.h: (Int8Array): (WTF::Int8Array::createUninitialized): (WTF): * wtf/Uint16Array.h: (Uint16Array): (WTF::Uint16Array::createUninitialized): (WTF): * wtf/Uint32Array.h: (Uint32Array): (WTF::Uint32Array::createUninitialized): (WTF): * wtf/Uint8Array.h: (Uint8Array): (WTF::Uint8Array::createUninitialized): (WTF): * wtf/Uint8ClampedArray.h: (Uint8ClampedArray): LayoutTests: Add test to check that constructing a Typed Array with nan values does not result in random values. * fast/canvas/webgl/array-constructor-expected.txt: Added. * fast/canvas/webgl/array-constructor.html: Added. Canonical link: https://commits.webkit.org/110369@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@123935 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-07-27 23:32:19 +00:00
<!DOCTYPE html>
<body>
<script src="../resources/runner.js"></script>
<script>
var length = 1000000;
use createUninitialized when creating TypedArray from another array https://bugs.webkit.org/show_bug.cgi?id=92518 Patch by Arnaud Renevier <a.renevier@sisa.samsung.com> on 2012-07-27 Reviewed by Kenneth Russell. PerformanceTests: * Bindings/typed-array-construct-from-array.html: Added. Source/WebCore: When creating a Typed Array from another array, we fill it with values from the source array. So, we can create it uninitialized. This is make constructor about 35% faster when constructed with another typed array. Test: fast/canvas/webgl/array-constructor.html * bindings/js/JSArrayBufferViewHelper.h: (WebCore::constructArrayBufferViewWithTypedArrayArgument): (WebCore::constructArrayBufferView): Source/WTF: Expose a createUninitialized static method on TypedArray classes. * wtf/Float32Array.h: (Float32Array): (WTF::Float32Array::createUninitialized): (WTF): * wtf/Float64Array.h: (Float64Array): (WTF::Float64Array::createUninitialized): (WTF): * wtf/Int16Array.h: (Int16Array): (WTF::Int16Array::createUninitialized): (WTF): * wtf/Int32Array.h: (Int32Array): (WTF::Int32Array::createUninitialized): (WTF): * wtf/Int8Array.h: (Int8Array): (WTF::Int8Array::createUninitialized): (WTF): * wtf/Uint16Array.h: (Uint16Array): (WTF::Uint16Array::createUninitialized): (WTF): * wtf/Uint32Array.h: (Uint32Array): (WTF::Uint32Array::createUninitialized): (WTF): * wtf/Uint8Array.h: (Uint8Array): (WTF::Uint8Array::createUninitialized): (WTF): * wtf/Uint8ClampedArray.h: (Uint8ClampedArray): LayoutTests: Add test to check that constructing a Typed Array with nan values does not result in random values. * fast/canvas/webgl/array-constructor-expected.txt: Added. * fast/canvas/webgl/array-constructor.html: Added. Canonical link: https://commits.webkit.org/110369@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@123935 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-07-27 23:32:19 +00:00
var source = new Array(length);
for (var i = 0; i < length; i++)
use createUninitialized when creating TypedArray from another array https://bugs.webkit.org/show_bug.cgi?id=92518 Patch by Arnaud Renevier <a.renevier@sisa.samsung.com> on 2012-07-27 Reviewed by Kenneth Russell. PerformanceTests: * Bindings/typed-array-construct-from-array.html: Added. Source/WebCore: When creating a Typed Array from another array, we fill it with values from the source array. So, we can create it uninitialized. This is make constructor about 35% faster when constructed with another typed array. Test: fast/canvas/webgl/array-constructor.html * bindings/js/JSArrayBufferViewHelper.h: (WebCore::constructArrayBufferViewWithTypedArrayArgument): (WebCore::constructArrayBufferView): Source/WTF: Expose a createUninitialized static method on TypedArray classes. * wtf/Float32Array.h: (Float32Array): (WTF::Float32Array::createUninitialized): (WTF): * wtf/Float64Array.h: (Float64Array): (WTF::Float64Array::createUninitialized): (WTF): * wtf/Int16Array.h: (Int16Array): (WTF::Int16Array::createUninitialized): (WTF): * wtf/Int32Array.h: (Int32Array): (WTF::Int32Array::createUninitialized): (WTF): * wtf/Int8Array.h: (Int8Array): (WTF::Int8Array::createUninitialized): (WTF): * wtf/Uint16Array.h: (Uint16Array): (WTF::Uint16Array::createUninitialized): (WTF): * wtf/Uint32Array.h: (Uint32Array): (WTF::Uint32Array::createUninitialized): (WTF): * wtf/Uint8Array.h: (Uint8Array): (WTF::Uint8Array::createUninitialized): (WTF): * wtf/Uint8ClampedArray.h: (Uint8ClampedArray): LayoutTests: Add test to check that constructing a Typed Array with nan values does not result in random values. * fast/canvas/webgl/array-constructor-expected.txt: Added. * fast/canvas/webgl/array-constructor.html: Added. Canonical link: https://commits.webkit.org/110369@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@123935 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-07-27 23:32:19 +00:00
source[i] = i;
Rename PerfTestRunner.runPerSecond to PerfTestRunner.measureRunsPerSecond for consistency https://bugs.webkit.org/show_bug.cgi?id=99642 Reviewed by Dirk Pranke. Renamed the method. * Bindings/append-child.html: * Bindings/create-element.html: * Bindings/event-target-wrapper.html: * Bindings/first-child.html: * Bindings/get-attribute.html: * Bindings/get-element-by-id.html: * Bindings/get-elements-by-tag-name.html: * Bindings/id-getter.html: * Bindings/id-setter.html: * Bindings/insert-before.html: * Bindings/node-list-access.html: * Bindings/scroll-top.html: * Bindings/set-attribute.html: * Bindings/typed-array-construct-from-array.html: * Bindings/typed-array-construct-from-same-type.html: * Bindings/typed-array-construct-from-typed.html: * Bindings/typed-array-set-from-typed.html: * Bindings/undefined-first-child.html: * Bindings/undefined-get-element-by-id.html: * Bindings/undefined-id-getter.html: * CSS/CSSPropertySetterGetter.html: * CSS/CSSPropertyUpdateValue.html: * CSS/PseudoClassSelectors.html: * DOM/textarea-dom.html: * DOM/textarea-edit.html: * Interactive/resources/window-resize.js: * Layout/flexbox-column-nowrap.html: * Layout/flexbox-column-wrap.html: * Layout/flexbox-row-nowrap.html: * Layout/flexbox-row-wrap.html: * Layout/line-layout.html: * Parser/css-parser-yui.html: * Parser/innerHTML-setter.html: * Parser/query-selector-deep.html: * Parser/query-selector-first.html: * Parser/query-selector-last.html: * Parser/simple-url.html: * Parser/textarea-parsing.html: * Parser/tiny-innerHTML.html: * Parser/url-parser.html: * Parser/xml-parser.html: * SVG/SvgNestedUse.html: * resources/runner.js: Canonical link: https://commits.webkit.org/117606@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@131651 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-10-17 22:06:52 +00:00
PerfTestRunner.measureRunsPerSecond({run: function() {
use createUninitialized when creating TypedArray from another array https://bugs.webkit.org/show_bug.cgi?id=92518 Patch by Arnaud Renevier <a.renevier@sisa.samsung.com> on 2012-07-27 Reviewed by Kenneth Russell. PerformanceTests: * Bindings/typed-array-construct-from-array.html: Added. Source/WebCore: When creating a Typed Array from another array, we fill it with values from the source array. So, we can create it uninitialized. This is make constructor about 35% faster when constructed with another typed array. Test: fast/canvas/webgl/array-constructor.html * bindings/js/JSArrayBufferViewHelper.h: (WebCore::constructArrayBufferViewWithTypedArrayArgument): (WebCore::constructArrayBufferView): Source/WTF: Expose a createUninitialized static method on TypedArray classes. * wtf/Float32Array.h: (Float32Array): (WTF::Float32Array::createUninitialized): (WTF): * wtf/Float64Array.h: (Float64Array): (WTF::Float64Array::createUninitialized): (WTF): * wtf/Int16Array.h: (Int16Array): (WTF::Int16Array::createUninitialized): (WTF): * wtf/Int32Array.h: (Int32Array): (WTF::Int32Array::createUninitialized): (WTF): * wtf/Int8Array.h: (Int8Array): (WTF::Int8Array::createUninitialized): (WTF): * wtf/Uint16Array.h: (Uint16Array): (WTF::Uint16Array::createUninitialized): (WTF): * wtf/Uint32Array.h: (Uint32Array): (WTF::Uint32Array::createUninitialized): (WTF): * wtf/Uint8Array.h: (Uint8Array): (WTF::Uint8Array::createUninitialized): (WTF): * wtf/Uint8ClampedArray.h: (Uint8ClampedArray): LayoutTests: Add test to check that constructing a Typed Array with nan values does not result in random values. * fast/canvas/webgl/array-constructor-expected.txt: Added. * fast/canvas/webgl/array-constructor.html: Added. Canonical link: https://commits.webkit.org/110369@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@123935 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-07-27 23:32:19 +00:00
var target = new Uint8Array(source);
}});
use createUninitialized when creating TypedArray from another array https://bugs.webkit.org/show_bug.cgi?id=92518 Patch by Arnaud Renevier <a.renevier@sisa.samsung.com> on 2012-07-27 Reviewed by Kenneth Russell. PerformanceTests: * Bindings/typed-array-construct-from-array.html: Added. Source/WebCore: When creating a Typed Array from another array, we fill it with values from the source array. So, we can create it uninitialized. This is make constructor about 35% faster when constructed with another typed array. Test: fast/canvas/webgl/array-constructor.html * bindings/js/JSArrayBufferViewHelper.h: (WebCore::constructArrayBufferViewWithTypedArrayArgument): (WebCore::constructArrayBufferView): Source/WTF: Expose a createUninitialized static method on TypedArray classes. * wtf/Float32Array.h: (Float32Array): (WTF::Float32Array::createUninitialized): (WTF): * wtf/Float64Array.h: (Float64Array): (WTF::Float64Array::createUninitialized): (WTF): * wtf/Int16Array.h: (Int16Array): (WTF::Int16Array::createUninitialized): (WTF): * wtf/Int32Array.h: (Int32Array): (WTF::Int32Array::createUninitialized): (WTF): * wtf/Int8Array.h: (Int8Array): (WTF::Int8Array::createUninitialized): (WTF): * wtf/Uint16Array.h: (Uint16Array): (WTF::Uint16Array::createUninitialized): (WTF): * wtf/Uint32Array.h: (Uint32Array): (WTF::Uint32Array::createUninitialized): (WTF): * wtf/Uint8Array.h: (Uint8Array): (WTF::Uint8Array::createUninitialized): (WTF): * wtf/Uint8ClampedArray.h: (Uint8ClampedArray): LayoutTests: Add test to check that constructing a Typed Array with nan values does not result in random values. * fast/canvas/webgl/array-constructor-expected.txt: Added. * fast/canvas/webgl/array-constructor.html: Added. Canonical link: https://commits.webkit.org/110369@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@123935 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-07-27 23:32:19 +00:00
</script>
</body>