mirror of
https://github.com/google/pebble.git
synced 2025-05-28 14:03:12 +00:00
Import of the watch repository from Pebble
This commit is contained in:
commit
3b92768480
10334 changed files with 2564465 additions and 0 deletions
23
third_party/jerryscript/tests/benchmarks/jerry/fill-array-with-numbers-3-times-5000-elements.js
vendored
Normal file
23
third_party/jerryscript/tests/benchmarks/jerry/fill-array-with-numbers-3-times-5000-elements.js
vendored
Normal file
|
@ -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;
|
||||
}
|
||||
}
|
36
third_party/jerryscript/tests/benchmarks/jerry/function_loop.js
vendored
Normal file
36
third_party/jerryscript/tests/benchmarks/jerry/function_loop.js
vendored
Normal file
|
@ -0,0 +1,36 @@
|
|||
// Copyright 2014 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.
|
||||
|
||||
var x = 7;
|
||||
var y = 3;
|
||||
var count = 1000000;
|
||||
|
||||
function cse_opt(x, y)
|
||||
{
|
||||
var tmp1 = x * x;
|
||||
var tmp2 = y * y;
|
||||
var tmp3 = tmp1 * tmp1;
|
||||
var tmp4 = tmp2 * tmp2;
|
||||
|
||||
for (var i = 0; i < count; i++) {
|
||||
var cached1 = tmp3 * x
|
||||
var cached2 = tmp4 * y;
|
||||
var cached_n_cached = cached1 + cached2;
|
||||
var ret_val = cached_n_cached + cached_n_cached;
|
||||
}
|
||||
|
||||
return ret_val + ret_val;
|
||||
};
|
||||
|
||||
cse_opt(x, y);
|
36
third_party/jerryscript/tests/benchmarks/jerry/gc.js
vendored
Normal file
36
third_party/jerryscript/tests/benchmarks/jerry/gc.js
vendored
Normal file
|
@ -0,0 +1,36 @@
|
|||
// Copyright 2015 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.
|
||||
|
||||
function f (o, i) {
|
||||
if (--i > 0) {
|
||||
f ({a:o, b:o}, i);
|
||||
}
|
||||
}
|
||||
|
||||
for (var i = 0; i < 100; i++)
|
||||
{
|
||||
({} + f ({}, 12));
|
||||
}
|
||||
|
||||
for(var i = 0; i < 100; i++)
|
||||
{
|
||||
var obj = {}, obj_l;
|
||||
obj_l = obj;
|
||||
|
||||
for (var k = 0; k < 1500; k++)
|
||||
{
|
||||
obj_l.prop = {};
|
||||
obj_l = obj_l.prop;
|
||||
}
|
||||
}
|
30
third_party/jerryscript/tests/benchmarks/jerry/loop_arithmetics_10kk.js
vendored
Normal file
30
third_party/jerryscript/tests/benchmarks/jerry/loop_arithmetics_10kk.js
vendored
Normal file
|
@ -0,0 +1,30 @@
|
|||
// Copyright 2014 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.
|
||||
|
||||
var count = 10000000;
|
||||
var x = 7;
|
||||
var y = 3;
|
||||
|
||||
var tmp1;
|
||||
var tmp2;
|
||||
var tmp3;
|
||||
var tmp4;
|
||||
|
||||
for (var i = 0; i < count; i++)
|
||||
{
|
||||
tmp1 = x * x;
|
||||
tmp2 = y * y;
|
||||
tmp3 = tmp1 * tmp1;
|
||||
tmp4 = tmp2 * tmp2;
|
||||
}
|
30
third_party/jerryscript/tests/benchmarks/jerry/loop_arithmetics_1kk.js
vendored
Normal file
30
third_party/jerryscript/tests/benchmarks/jerry/loop_arithmetics_1kk.js
vendored
Normal file
|
@ -0,0 +1,30 @@
|
|||
// Copyright 2014 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.
|
||||
|
||||
var count = 1000000;
|
||||
var x = 7;
|
||||
var y = 3;
|
||||
|
||||
var tmp1;
|
||||
var tmp2;
|
||||
var tmp3;
|
||||
var tmp4;
|
||||
|
||||
for (var i = 0; i < count; i++)
|
||||
{
|
||||
tmp1 = x * x;
|
||||
tmp2 = y * y;
|
||||
tmp3 = tmp1 * tmp1;
|
||||
tmp4 = tmp2 * tmp2;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue