Test name | Executions per second |
---|---|
array | 1507330.8 Ops/sec |
obj | 958543.6 Ops/sec |
const a = [
{
key: 'porsche',
displayName: 'Porsche',
count: 98,
make: 'porsche'
},
{ key: 'tesla', displayName: 'Tesla', count: 232, make: 'tesla' },
{
key: 'lamborghini',
displayName: 'Lamborghini',
count: 9,
make: 'lamborghini'
},
{ key: 'lotus', displayName: 'Lotus', count: 2, make: 'lotus' },
{ key: 'ford', displayName: 'Ford', count: 6207, make: 'ford' },
{ key: 'bmw', displayName: 'BMW', count: 2728, make: 'bmw' },
{ key: 'ds', displayName: 'DS', count: 135, make: 'ds' },
{ key: 'kgm', displayName: 'Kgm', count: 6, make: 'kgm' },
{
key: 'genesis',
displayName: 'Genesis',
count: 1,
make: 'genesis'
},
{ key: 'audi', displayName: 'Audi', count: 10135, make: 'audi' },
{ key: 'morgan', displayName: 'Morgan', count: 1, make: 'morgan' },
{
key: 'mercedes_benz',
displayName: 'Mercedes-Benz',
count: 2737,
make: 'mercedes_benz'
},
{ key: 'jeep', displayName: 'Jeep', count: 133, make: 'jeep' },
{ key: 'fiat', displayName: 'Fiat', count: 544, make: 'fiat' },
{
key: 'mitsubishi',
displayName: 'Mitsubishi',
count: 153,
make: 'mitsubishi'
},
{
key: 'volkswagen',
displayName: 'Volkswagen',
count: 5496,
make: 'volkswagen'
},
{
key: 'alfa_romeo',
displayName: 'Alfa Romeo',
count: 77,
make: 'alfa_romeo'
},
{
key: 'mitsubishi_fuso',
displayName: 'Mitsubishi Fuso',
count: 1,
make: 'mitsubishi_fuso'
},
{ key: 'abarth', displayName: 'Abarth', count: 74, make: 'abarth' },
{
key: 'aston_martin',
displayName: 'Aston Martin',
count: 47,
make: 'aston_martin'
},
{
key: 'mclaren',
displayName: 'McLaren',
count: 11,
make: 'mclaren'
},
{
key: 'ferrari',
displayName: 'Ferrari',
count: 4,
make: 'ferrari'
},
{ key: 'maxus', displayName: 'Maxus', count: 13, make: 'maxus' },
{ key: 'seat', displayName: 'SEAT', count: 1477, make: 'seat' },
{ key: 'dacia', displayName: 'Dacia', count: 581, make: 'dacia' },
{
key: 'chrysler',
displayName: 'Chrysler',
count: 1,
make: 'chrysler'
},
{
key: 'chevrolet',
displayName: 'Chevrolet',
count: 1,
make: 'chevrolet'
},
{ key: 'alpine', displayName: 'Alpine', count: 3, make: 'alpine' },
{
key: 'citroen',
displayName: 'Citroen',
count: 1604,
make: 'citroen'
},
{
key: 'toyota',
displayName: 'Toyota',
count: 1076,
make: 'toyota'
},
{ key: 'iveco', displayName: 'Iveco', count: 3, make: 'iveco' },
{
key: 'vauxhall',
displayName: 'Vauxhall',
count: 3018,
make: 'vauxhall'
},
{
key: 'jaguar',
displayName: 'Jaguar',
count: 723,
make: 'jaguar'
},
{ key: 'ineos', displayName: 'Ineos', count: 9, make: 'ineos' },
{ key: 'kia', displayName: 'Kia', count: 2609, make: 'kia' },
{
key: 'land_rover',
displayName: 'Land Rover',
count: 1768,
make: 'land_rover'
},
{ key: 'fisker', displayName: 'Fisker', count: 3, make: 'fisker' },
{
key: 'hyundai',
displayName: 'Hyundai',
count: 1754,
make: 'hyundai'
},
{ key: 'cupra', displayName: 'Cupra', count: 252, make: 'cupra' },
{
key: 'rolls_royce',
displayName: 'Rolls Royce',
count: 5,
make: 'rolls_royce'
},
{
key: 'infiniti',
displayName: 'Infiniti',
count: 19,
make: 'infiniti'
},
{
key: 'renault',
displayName: 'Renault',
count: 1409,
make: 'renault'
},
{ key: 'mazda', displayName: 'Mazda', count: 914, make: 'mazda' },
{ key: 'smart', displayName: 'Smart', count: 51, make: 'smart' },
{ key: 'skoda', displayName: 'Skoda', count: 2465, make: 'skoda' },
{
key: 'maserati',
displayName: 'Maserati',
count: 14,
make: 'maserati'
},
{ key: 'levc', displayName: 'Levc', count: 2, make: 'levc' },
{
key: 'peugeot',
displayName: 'Peugeot',
count: 2862,
make: 'peugeot'
},
{
key: 'suzuki',
displayName: 'Suzuki',
count: 442,
make: 'suzuki'
},
{ key: 'lexus', displayName: 'Lexus', count: 113, make: 'lexus' },
{ key: 'ora', displayName: 'Ora', count: 13, make: 'ora' },
{
key: 'polestar',
displayName: 'Polestar',
count: 73,
make: 'polestar'
},
{ key: 'mini', displayName: 'MINI', count: 1050, make: 'mini' },
{ key: 'honda', displayName: 'Honda', count: 1271, make: 'honda' },
{
key: 'mg_motor_uk',
displayName: 'MG',
count: 526,
make: 'mg_motor_uk'
},
{ key: 'byd', displayName: 'BYD', count: 2, make: 'byd' },
{
key: 'ssangyong',
displayName: 'SsangYong',
count: 52,
make: 'ssangyong'
},
{
key: 'bentley',
displayName: 'Bentley',
count: 28,
make: 'bentley'
},
{ key: 'subaru', displayName: 'Subaru', count: 50, make: 'subaru' },
{
key: 'nissan',
displayName: 'Nissan',
count: 3344,
make: 'nissan'
},
{ key: 'isuzu', displayName: 'Isuzu', count: 26, make: 'isuzu' },
{ key: 'volvo', displayName: 'Volvo', count: 2135, make: 'volvo' },
{ key: 'ldv', displayName: 'LDV', count: 1, make: 'ldv' }
];
const make = a.find(makeObj => makeObj.key === 'ldv');
return make;
const a = {
porsche: {
key: 'porsche',
displayName: 'Porsche',
count: 98,
make: 'porsche',
modelsPerMake: []
},
tesla: {
key: 'tesla',
displayName: 'Tesla',
count: 232,
make: 'tesla',
modelsPerMake: []
},
lamborghini: {
key: 'lamborghini',
displayName: 'Lamborghini',
count: 9,
make: 'lamborghini',
modelsPerMake: []
},
lotus: {
key: 'lotus',
displayName: 'Lotus',
count: 2,
make: 'lotus',
modelsPerMake: []
},
ford: {
key: 'ford',
displayName: 'Ford',
count: 6207,
make: 'ford',
modelsPerMake: []
},
bmw: {
key: 'bmw',
displayName: 'BMW',
count: 2728,
make: 'bmw',
modelsPerMake: []
},
ds: {
key: 'ds',
displayName: 'DS',
count: 135,
make: 'ds',
modelsPerMake: []
},
kgm: {
key: 'kgm',
displayName: 'Kgm',
count: 6,
make: 'kgm',
modelsPerMake: []
},
genesis: {
key: 'genesis',
displayName: 'Genesis',
count: 1,
make: 'genesis',
modelsPerMake: []
},
audi: {
key: 'audi',
displayName: 'Audi',
count: 10135,
make: 'audi',
modelsPerMake: []
},
morgan: {
key: 'morgan',
displayName: 'Morgan',
count: 1,
make: 'morgan',
modelsPerMake: []
},
mercedes_benz: {
key: 'mercedes_benz',
displayName: 'Mercedes-Benz',
count: 2737,
make: 'mercedes_benz',
modelsPerMake: []
},
jeep: {
key: 'jeep',
displayName: 'Jeep',
count: 133,
make: 'jeep',
modelsPerMake: []
},
fiat: {
key: 'fiat',
displayName: 'Fiat',
count: 544,
make: 'fiat',
modelsPerMake: []
},
mitsubishi: {
key: 'mitsubishi',
displayName: 'Mitsubishi',
count: 153,
make: 'mitsubishi',
modelsPerMake: []
},
volkswagen: {
key: 'volkswagen',
displayName: 'Volkswagen',
count: 5496,
make: 'volkswagen',
modelsPerMake: []
},
alfa_romeo: {
key: 'alfa_romeo',
displayName: 'Alfa Romeo',
count: 77,
make: 'alfa_romeo',
modelsPerMake: []
},
mitsubishi_fuso: {
key: 'mitsubishi_fuso',
displayName: 'Mitsubishi Fuso',
count: 1,
make: 'mitsubishi_fuso',
modelsPerMake: []
},
abarth: {
key: 'abarth',
displayName: 'Abarth',
count: 74,
make: 'abarth',
modelsPerMake: []
},
aston_martin: {
key: 'aston_martin',
displayName: 'Aston Martin',
count: 47,
make: 'aston_martin',
modelsPerMake: []
},
mclaren: {
key: 'mclaren',
displayName: 'McLaren',
count: 11,
make: 'mclaren',
modelsPerMake: []
},
ferrari: {
key: 'ferrari',
displayName: 'Ferrari',
count: 4,
make: 'ferrari',
modelsPerMake: []
},
maxus: {
key: 'maxus',
displayName: 'Maxus',
count: 13,
make: 'maxus',
modelsPerMake: []
},
seat: {
key: 'seat',
displayName: 'SEAT',
count: 1477,
make: 'seat',
modelsPerMake: []
},
dacia: {
key: 'dacia',
displayName: 'Dacia',
count: 581,
make: 'dacia',
modelsPerMake: []
},
chrysler: {
key: 'chrysler',
displayName: 'Chrysler',
count: 1,
make: 'chrysler',
modelsPerMake: []
},
chevrolet: {
key: 'chevrolet',
displayName: 'Chevrolet',
count: 1,
make: 'chevrolet',
modelsPerMake: []
},
alpine: {
key: 'alpine',
displayName: 'Alpine',
count: 3,
make: 'alpine',
modelsPerMake: []
},
citroen: {
key: 'citroen',
displayName: 'Citroen',
count: 1604,
make: 'citroen',
modelsPerMake: [Array]
},
toyota: {
key: 'toyota',
displayName: 'Toyota',
count: 1076,
make: 'toyota',
modelsPerMake: []
},
iveco: {
key: 'iveco',
displayName: 'Iveco',
count: 3,
make: 'iveco',
modelsPerMake: []
},
vauxhall: {
key: 'vauxhall',
displayName: 'Vauxhall',
count: 3018,
make: 'vauxhall',
modelsPerMake: []
},
jaguar: {
key: 'jaguar',
displayName: 'Jaguar',
count: 723,
make: 'jaguar',
modelsPerMake: []
},
ineos: {
key: 'ineos',
displayName: 'Ineos',
count: 9,
make: 'ineos',
modelsPerMake: []
},
kia: {
key: 'kia',
displayName: 'Kia',
count: 2609,
make: 'kia',
modelsPerMake: []
},
land_rover: {
key: 'land_rover',
displayName: 'Land Rover',
count: 1768,
make: 'land_rover',
modelsPerMake: []
},
fisker: {
key: 'fisker',
displayName: 'Fisker',
count: 3,
make: 'fisker',
modelsPerMake: []
},
hyundai: {
key: 'hyundai',
displayName: 'Hyundai',
count: 1754,
make: 'hyundai',
modelsPerMake: []
},
cupra: {
key: 'cupra',
displayName: 'Cupra',
count: 252,
make: 'cupra',
modelsPerMake: []
},
rolls_royce: {
key: 'rolls_royce',
displayName: 'Rolls Royce',
count: 5,
make: 'rolls_royce',
modelsPerMake: []
},
infiniti: {
key: 'infiniti',
displayName: 'Infiniti',
count: 19,
make: 'infiniti',
modelsPerMake: []
},
renault: {
key: 'renault',
displayName: 'Renault',
count: 1409,
make: 'renault',
modelsPerMake: []
},
mazda: {
key: 'mazda',
displayName: 'Mazda',
count: 914,
make: 'mazda',
modelsPerMake: []
},
smart: {
key: 'smart',
displayName: 'Smart',
count: 51,
make: 'smart',
modelsPerMake: []
},
skoda: {
key: 'skoda',
displayName: 'Skoda',
count: 2465,
make: 'skoda',
modelsPerMake: []
},
maserati: {
key: 'maserati',
displayName: 'Maserati',
count: 14,
make: 'maserati',
modelsPerMake: []
},
levc: {
key: 'levc',
displayName: 'Levc',
count: 2,
make: 'levc',
modelsPerMake: []
},
peugeot: {
key: 'peugeot',
displayName: 'Peugeot',
count: 2862,
make: 'peugeot',
modelsPerMake: []
},
suzuki: {
key: 'suzuki',
displayName: 'Suzuki',
count: 442,
make: 'suzuki',
modelsPerMake: []
},
lexus: {
key: 'lexus',
displayName: 'Lexus',
count: 113,
make: 'lexus',
modelsPerMake: []
},
ora: {
key: 'ora',
displayName: 'Ora',
count: 13,
make: 'ora',
modelsPerMake: []
},
polestar: {
key: 'polestar',
displayName: 'Polestar',
count: 73,
make: 'polestar',
modelsPerMake: []
},
mini: {
key: 'mini',
displayName: 'MINI',
count: 1050,
make: 'mini',
modelsPerMake: []
},
honda: {
key: 'honda',
displayName: 'Honda',
count: 1271,
make: 'honda',
modelsPerMake: []
},
mg_motor_uk: {
key: 'mg_motor_uk',
displayName: 'MG',
count: 526,
make: 'mg_motor_uk',
modelsPerMake: []
},
byd: {
key: 'byd',
displayName: 'BYD',
count: 2,
make: 'byd',
modelsPerMake: []
},
ssangyong: {
key: 'ssangyong',
displayName: 'SsangYong',
count: 52,
make: 'ssangyong',
modelsPerMake: []
},
bentley: {
key: 'bentley',
displayName: 'Bentley',
count: 28,
make: 'bentley',
modelsPerMake: []
},
subaru: {
key: 'subaru',
displayName: 'Subaru',
count: 50,
make: 'subaru',
modelsPerMake: []
},
nissan: {
key: 'nissan',
displayName: 'Nissan',
count: 3344,
make: 'nissan',
modelsPerMake: []
},
isuzu: {
key: 'isuzu',
displayName: 'Isuzu',
count: 26,
make: 'isuzu',
modelsPerMake: []
},
volvo: {
key: 'volvo',
displayName: 'Volvo',
count: 2135,
make: 'volvo',
modelsPerMake: []
},
ldv: {
key: 'ldv',
displayName: 'LDV',
count: 1,
make: 'ldv',
modelsPerMake: []
}
};
const make = a['ldv'];
return make;