Travis build: 659

This commit is contained in:
30secondsofcode
2018-10-19 06:06:32 +00:00
parent e5d9cfbf2b
commit a9d3d77be2
11 changed files with 213 additions and 452 deletions

View File

@ -15,8 +15,7 @@ const elo = ([...ratings], kFactor = 32, selfRating) => {
const expectedScore = (self, opponent) => 1 / (1 + 10 ** ((opponent - self) / 400));
const newRating = (rating, i) =>
(selfRating || rating) + kFactor * (i - expectedScore(i ? a : b, i ? b : a));
if (ratings.length === 2)
return [newRating(a, 1), newRating(b, 0)];
if (ratings.length === 2) return [newRating(a, 1), newRating(b, 0)];
for (let i = 0, len = ratings.length; i < len; i++) {
let j = i;

View File

@ -28,11 +28,9 @@ const runAsync = fn => {
const longRunningFunction = () => {
let result = 0;
for (let i = 0; i < 1000; i++) {
for (let j = 0; j < 700; j++) {
for (let k = 0; k < 300; k++)
result = result + i + j + k;
for (let j = 0; j < 700; j++)
for (let k = 0; k < 300; k++) result = result + i + j + k;
}
}
return result;
};