asdasdascacvvacvd

Benchmark created by asd on


Setup

var inputChannels = [123, 456, 789],
        activeChannels = {
            '123': 1,
            '456': 0.5
        },
        activeChannel,
        ac,
        len = inputChannels.length,
        i = 0;

Test runner

Ready to run.

Testing in
TestOps/sec
asdasd
for (activeChannel in activeChannels) {
            if (!activeChannels.hasOwnProperty(activeChannel)) {
                continue;
            }

            for (; i < len; i++) {
                if (inputChannels[i] == activeChannel && activeChannels[activeChannel]) {}
            }
        }
ready
adaFW3
for (activeChannel in activeChannels) {
            if (!activeChannels.hasOwnProperty(activeChannel)) {
                continue;
            }

            for (; i < len; i++) {
                if (inputChannels[i] === ~~activeChannel && activeChannels[activeChannel]) {}
            }
        }
ready
vsadfvdf
for (activeChannel in activeChannels) {
            if (!activeChannels.hasOwnProperty(activeChannel)) {
                continue;
            }

ac = ~~activeChannel;

            for (; i < len; i++) {
                if (inputChannels[i] === ac && activeChannels[ac]) {}
            }
        }
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.