var cryptos = [
{name: 'Bitcoin', symbol: 'BTCUSD', icon: 'btc', thumb: 'bitcoin.jpg'},
{name: 'Ethereum', symbol: 'ETHUSD', icon: 'eth', thumb: 'ethereum.png'},
{name: 'BNB', symbol: 'BNBUSD', icon: 'bnb', thumb: 'bnb.png'},
{name: 'Cardano', symbol: 'ADAUSD', icon: 'cardano', thumb: 'cardano.jpg'},
{name: 'Solana', symbol: 'SOLUSD', icon: 'sol', thumb: 'sol.png'},
{name: 'XRP', symbol: 'XRPUSD', icon: 'xrp', thumb: 'xrp.png'},
{name: 'Polkadot', symbol: 'DOTUSD', icon: 'polkadot', thumb: 'polkadot.png'},
{name: 'Dogecoin', symbol: 'DOGEUSD', icon: 'doge', thumb: 'doge.jpg'},
{name: 'Shiba Inu', symbol: 'SHIBUSD', icon: 'shiba', thumb: 'shiba.png'},
{name: 'Terra', symbol: 'LUNAUSD', icon: 'luna', thumb: 'luna.png'},
{name: 'Avalanche', symbol: 'AVAXUSD', icon: 'avax', thumb: 'avax.png'},
{name: 'Litecoin', symbol: 'LTCUSD', icon: 'ltc', thumb: 'ltc.png'},
{name: 'Uniswap', symbol: 'UNIUSD', icon: 'uni', thumb: 'uni.png'},
{name: 'Chainlink', symbol: 'LINKUSD', icon: 'link', thumb: 'link.png'},
{name: 'Polygon', symbol: 'MATICUSD', icon: 'matic', thumb: 'matic.png'},
{name: 'Algorand', symbol: 'ALGOUSD', icon: 'algo', thumb: 'algo.png'},
{name: 'VeChain', symbol: 'VETUSD', icon: 'vet', thumb: 'vet.png'},
{name: 'Stellar', symbol: 'XLMUSD', icon: 'xlm', thumb: 'xlm.png'},
{name: 'Axie Infinity', symbol: 'AXSUSD', icon: 'axie', thumb: 'axie.png'},
{name: 'Filecoin', symbol: 'FILUSD', icon: 'file', thumb: 'file.png'},
{name: 'TRON', symbol: 'TRXUSD', icon: 'tron', thumb: 'tron.png'},
{name: 'Ethereum Classic', symbol: 'ETCUSD', icon: 'etc', thumb: 'etc.png'},
{name: 'Cosmos', symbol: 'ATOMUSD', icon: 'atom', thumb: 'atom.png'},
{name: 'THETA', symbol: 'THETAUSD', icon: 'theta', thumb: 'theta.png'},
{name: 'FTX Token', symbol: 'FTTUSD', icon: 'ftt', thumb: 'ftt.png'},
{name: 'Fantom', symbol: 'FTMUSD', icon: 'ftm', thumb: 'ftm.png'},
{name: 'Hedera', symbol: 'HBARUSD', icon: 'hbar', thumb: 'hbar.png'},
{name: 'Dai', symbol: 'DAIUSD', icon: 'dai', thumb: 'dai.png'},
{name: 'Elrond', symbol: 'EGLDUSD', icon: 'egld', thumb: 'egld.png'},
{name: 'NEAR Protocol', symbol: 'NEARUSD', icon: 'near', thumb: 'near.png'},
{name: 'The Graph', symbol: 'GRTUSD', icon: 'grt', thumb: 'grt.png'},
{name: 'Tezos', symbol: 'XTZUSD', icon: 'xtz', thumb: 'xtz.png'},
{name: 'Monero', symbol: 'XMRUSD', icon: 'xmr', thumb: 'xmr.png'},
{name: 'EOS', symbol: 'EOSUSD', icon: 'eos', thumb: 'eos.png'},
{name: 'Decentraland', symbol: 'MANAUSD', icon: 'mana', thumb: 'mana.png'},
{name: 'Helium', symbol: 'HNTUSD', icon: 'hnt', thumb: 'hnt.png'},
{name: 'PancakeSwap', symbol: 'CAKEUSD', icon: 'cake', thumb: 'cake.png'},
{name: 'Aave', symbol: 'AAVEUSD', icon: 'aave', thumb: 'aave.png'},
{name: 'Loopring', symbol: 'LRCUSD', icon: 'lrc', thumb: 'lrc.png'},
{name: 'IOTA', symbol: 'IOTAUSD', icon: 'iota', thumb: 'iota.png'},
{name: 'Neo', symbol: 'NEOUSD', icon: 'neo', thumb: 'neo.png'},
{name: 'Maker', symbol: 'MKRUSD', icon: 'mkr', thumb: 'mkr.png'},
{name: 'Enjin', symbol: 'ENJUSD', icon: 'enj', thumb: 'enj.png'},
{name: 'Dash', symbol: 'DASHUSD', icon: 'dash', thumb: 'dash.png'},
{name: 'Compound', symbol: 'COMPUSD', icon: 'comp', thumb: 'comp.png'},
{name: 'CRV', symbol: 'CRVUSD', icon: 'crv', thumb: 'crv.png'},
{name: 'BAT', symbol: 'BATUSD', icon: 'bat', thumb: 'bat.png'},
{name: 'SushiSwap', symbol: 'SUSHIUSD', icon: 'sushi', thumb: 'sushi.png'},
{name: 'Zilliqa', symbol: 'ZILUSD', icon: 'zil', thumb: 'zil.png'},
{name: 'yearn.finance', symbol: 'YFIUSD', icon: 'yfi', thumb: 'yfi.png'},
{name: '1inch', symbol: '1INCHUSD', icon: 'oneinch', thumb: 'oneinch.png'},
];
let item = cryptos.find(index => index.symbol === 'XTZUSD');
let item = cryptos.findIndex(index => index.symbol === 'XTZUSD');
--enable-precise-memory-info
flag.
Test case name | Result |
---|---|
find() | |
findIndex() |
Test name | Executions per second |
---|---|
find() | 8103574.0 Ops/sec |
findIndex() | 8249402.5 Ops/sec |
It seems like you're providing an excerpt from a test report, likely generated by a benchmarking tool or framework.
Based on the content, I'll assume that this is related to testing the performance of a JavaScript array method, specifically findIndex()
and find()
, using various browsers and devices.
If I had to answer based on this excerpt alone, I'd say:
The current implementation of find()
and findIndex()
seems efficient. The benchmark results show that both methods are performing well, with Chrome 122 being the fastest browser in terms of executions per second. However, there might be room for improvement in handling edge cases or optimizing for specific use cases.
If you'd like more detailed insights, please provide additional context or clarify what specific aspects of performance optimization you're interested in exploring further.