what tha fack

Benchmark created on


Setup

const data = [{
  "id": 1,
  "first_name": "Valene",
  "last_name": "Bumphrey"
}, {
  "id": 2,
  "first_name": "Evvie",
  "last_name": "Ruggen"
}, {
  "id": 3,
  "first_name": "Torry",
  "last_name": "Savery"
}, {
 
  "first_name": "Tiler",
  "last_name": "Belamy"
}, {
  "id": 5,
  "first_name": "Bette",
  "last_name": "Tomet"
}, {
  "id": 6,
  "first_name": "Danit",
  "last_name": "Blaxland"
}, {
  "id": 7,
  "first_name": "Luz",
  "last_name": "Boken"
}, {
  "id": 8,
  "first_name": "Baily",
  "last_name": "Liveley"
}, {
  "id": 9,
  "first_name": "Milton",
  "last_name": "Duiguid"
}, {
  "id": 10,
  "first_name": "Sandy",
  "last_name": "Ferronet"
}, {
  "id": 11,
  "first_name": "Noam",
  "last_name": "Morewood"
}, {
  "id": 12,
  "first_name": "Marina",
  "last_name": "Bendix"
}, {
  "id": 13,
  "first_name": "Penny",
  "last_name": "Sambrook"
}, {
  "id": 14,
  "first_name": "Maryanna",
  "last_name": "Laingmaid"
}, {
  "id": 15,
  "first_name": "Xenos",
  "last_name": "Brookzie"
}, {
  "id": 16,
  "first_name": "Nicolais",
  "last_name": "Rosenbaum"
}, {
  "id": 17,
  "first_name": "Isidoro",
  "last_name": "Norvel"
}, {
  "id": 18,
  "first_name": "Mitzi",
  "last_name": "Langlois"
}, {
  "id": 19,
  "first_name": "Joye",
  "last_name": "Donovin"
}, {
  "id": 20,
  "first_name": "Vera",
  "last_name": "Ledson"
}, {
  "id": 21,
  "first_name": "Goddart",
  "last_name": "Seamark"
}, {
  "id": 22,
  "first_name": "Sydney",
  "last_name": "Richford"
}, {
  "id": 23,
  "first_name": "Corbin",
  "last_name": "Towlson"
}, {
  "id": 24,
  "first_name": "Layla",
  "last_name": "Ozintsev"
}, {
  "id": 25,
  "first_name": "Everett",
  "last_name": "Blowing"
}, {
  "id": 26,
  "first_name": "Gerome",
  "last_name": "O'Deoran"
}, {
  "id": 27,
  "first_name": "Aleece",
  "last_name": "Bodle"
}, {
  "id": 28,
  "first_name": "Imelda",
  "last_name": "Dewbury"
}, {
  "id": 29,
  "first_name": "Adoree",
  "last_name": "McCool"
}, {
  "id": 30,
  "first_name": "Cirillo",
  "last_name": "Parvin"
}, {
  "id": 31,
  "first_name": "Woody",
  "last_name": "Umbers"
}, {
  "id": 32,
  "first_name": "Priscella",
  "last_name": "Croydon"
}, {
  "id": 33,
  "first_name": "Stafford",
  "last_name": "Gontier"
}, {
  "id": 34,
  "first_name": "Gaultiero",
  "last_name": "Cattroll"
}, {
  "id": 35,
  "first_name": "Phelia",
  "last_name": "Gathercole"
}, {
  "id": 36,
  "first_name": "Siouxie",
  "last_name": "Gleeton"
}, {
  "id": 37,
  "first_name": "Mariel",
  "last_name": "MacFall"
}, {
  "id": 38,
  "first_name": "Millie",
  "last_name": "Flacke"
}, {
  "id": 39,
  "first_name": "Hilliard",
  "last_name": "Roussell"
}, {
  "id": 40,
  "first_name": "Hebert",
  "last_name": "Jessope"
}, {
  "id": 41,
  "first_name": "Reuven",
  "last_name": "Jaksic"
}, {
  "id": 42,
  "first_name": "Gilles",
  "last_name": "Houseago"
}, {
  "id": 43,
  "first_name": "Carmelina",
  "last_name": "Prin"
}, {
  "id": 44,
  "first_name": "Rayner",
  "last_name": "Jeandin"
}, {
  "id": 45,
  "first_name": "Truda",
  "last_name": "Vian"
}, {
  "id": 46,
  "first_name": "Esme",
  "last_name": "Galego"
}, {
  "id": 47,
  "first_name": "Teodor",
  "last_name": "Garaghan"
}, {
  "id": 48,
  "first_name": "Tessa",
  "last_name": "Altamirano"
}, {
  "id": 49,
  "first_name": "Lorna",
  "last_name": "Gianolo"
}, {
  "id": 50,
  "first_name": "Ashleigh",
  "last_name": "McDowell"
}, {
  "id": 51,
  "first_name": "Elora",
  "last_name": "Neenan"
}, {
  "id": 52,
  "first_name": "Dru",
  "last_name": "Doonican"
}, {
  "id": 53,
  "first_name": "Phillipp",
  "last_name": "Fargie"
}, {
  "id": 54,
  "first_name": "Linette",
  "last_name": "Godfroy"
}, {
  "id": 55,
  "first_name": "Dianna",
  "last_name": "Richarz"
}, {
  "id": 56,
  "first_name": "Eirena",
  "last_name": "Skelton"
}, {
  "id": 57,
  "first_name": "Alvina",
  "last_name": "Thwaite"
}, {
  "id": 58,
  "first_name": "Bartlett",
  "last_name": "McBean"
}, {
  "id": 59,
  "first_name": "Isiahi",
  "last_name": "Cholerton"
}, {
  "id": 60,
  "first_name": "Leigh",
  "last_name": "Sporton"
}, {
  "id": 61,
  "first_name": "Rhys",
  "last_name": "Settle"
}, {
  "id": 62,
  "first_name": "Oralia",
  "last_name": "Anchor"
}, {
  "id": 63,
  "first_name": "Lanae",
  "last_name": "Blazeby"
}, {
  "id": 64,
  "first_name": "Garreth",
  "last_name": "Stone Fewings"
}, {
  "id": 65,
  "first_name": "Domingo",
  "last_name": "Fitzroy"
}, {
  "id": 66,
  "first_name": "Christa",
  "last_name": "Carbery"
}, {
  "id": 67,
  "first_name": "Ambrose",
  "last_name": "Baelde"
}, {
  "id": 68,
  "first_name": "Itch",
  "last_name": "Maruszewski"
}, {
  "id": 69,
  "first_name": "Padraic",
  "last_name": "Rosenstock"
}, {
  "id": 70,
  "first_name": "Ernestine",
  "last_name": "Valdes"
}, {
  "id": 71,
  "first_name": "Murvyn",
  "last_name": "Yedall"
}, {
  
  "first_name": "Seka",
  "last_name": "McCartan"
}, {
  "id": 73,
  "first_name": "Rita",
  "last_name": "Senior"
}, {
  "id": 74,
  "first_name": "Denna",
  "last_name": "Llewellen"
}, {
  "id": 75,
  "first_name": "Darbee",
  "last_name": "Sturley"
}, {
  "id": 76,
  "first_name": "Hank",
  "last_name": "Ewols"
}, {
  "id": 77,
  "first_name": "Peggie",
  "last_name": "Brisse"
}, {
  "id": 78,
  "first_name": "Adelheid",
  "last_name": "Rentcome"
}, {
  "id": 79,
  "first_name": "Jard",
  "last_name": "Crackel"
}, {
  "id": 80,
  "first_name": "Pepe",
  "last_name": "Witcombe"
}, {
  "id": 81,
  "first_name": "Bellina",
  "last_name": "Spivey"
}, {
  "id": 82,
  "first_name": "Ferrel",
  "last_name": "Denes"
}, {
  "id": 83,
  "first_name": "Maxie",
  "last_name": "Falla"
}, {
  "id": 84,
  "first_name": "Garik",
  "last_name": "Crackett"
}, {
  "id": 85,
  "first_name": "Iosep",
  "last_name": "Rookesby"
}, {
  "id": 86,
  "first_name": "Tressa",
  "last_name": "Hinners"
}, {
  "id": 87,
  "first_name": "Nils",
  "last_name": "Strover"
}, {
  "id": 88,
  "first_name": "Elfreda",
  "last_name": "Arman"
}, {
  "id": 89,
  "first_name": "Emmerich",
  "last_name": "Massot"
}, {
  "id": 90,
  "first_name": "Dolf",
  "last_name": "Gligori"
}, {
  "id": 91,
  "first_name": "Isadore",
  "last_name": "Scandwright"
}, {
  "id": 92,
  "first_name": "Wilow",
  "last_name": "Flori"
}, {
  "id": 93,
  "first_name": "Dasha",
  "last_name": "Clayden"
}, {
  "id": 94,
  "first_name": "Glendon",
  "last_name": "Tomczykowski"
}, {
  "id": 95,
  "first_name": "Sonia",
  "last_name": "Pietzke"
}, {
  "id": 96,
  "first_name": "Walsh",
  "last_name": "Bazylets"
}, {
  "id": 97,
  "first_name": "Esmaria",
  "last_name": "Leak"
}, {
  "id": 98,
  "first_name": "Horatio",
  "last_name": "Bernardoni"
}, {
  "id": 99,
  "first_name": "Merry",
  "last_name": "Clitherow"
}, {

  "first_name": "Alex",
  "last_name": "Heisham"
}]

Test runner

Ready to run.

Testing in
TestOps/sec
map and filter
return data.map(x=>x.id).filter(Boolean)
ready
forEach
const arr = [];

data.forEach(x=>{
	if(x.id)
		arr.push(x.id)
}
)
return arr;
ready

Revisions

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