From 18d0d8c37635b49ca9d0c8dd7ab04258ab7b7f69 Mon Sep 17 00:00:00 2001 From: Ruben Ayrapetyan Date: Wed, 13 Jan 2016 21:13:45 +0300 Subject: [PATCH] Add microbenchmark on filling an array with 5000 numbers (3 times). JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com --- ...rray-with-numbers-3-times-5000-elements.js | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 tests/benchmarks/jerry/fill-array-with-numbers-3-times-5000-elements.js diff --git a/tests/benchmarks/jerry/fill-array-with-numbers-3-times-5000-elements.js b/tests/benchmarks/jerry/fill-array-with-numbers-3-times-5000-elements.js new file mode 100644 index 000000000..a7442f7cb --- /dev/null +++ b/tests/benchmarks/jerry/fill-array-with-numbers-3-times-5000-elements.js @@ -0,0 +1,23 @@ +// Copyright 2016 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +for (i = 0; i < 3; i++) +{ + a = []; + + for (j = 0; j < 5000; j++) + { + a[j] = j; + } +}