Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Teste forEach Vinicius
(version: 0)
teste
Comparing performance of:
Teste 1 vs Teste 2
Created:
one year ago
by:
Guest
Jump to the latest result
Tests:
Teste 1
console.log(extractIdsFromInvoiceTags()); function extractIdsFromInvoiceTags() { let tagIds = []; let invoiceTags {"tags": [{"id": 1}, {"id": 2}, {"id": 3}]}; if (invoiceTags && invoiceTags.tags && invoiceTags.tags.length) { tagIds = invoiceTags.tags.forEach(tagInfo => { tagIds.push(tagInfo.id); }) return tagIds; } }
Teste 2
console.log(extractIdsFromInvoiceTags()); function extractIdsFromInvoiceTags() { let invoiceTags {"tags": [{"id": 1}, {"id": 2}, {"id": 3}]}; if (invoiceTags && invoiceTags.tags && invoiceTags.tags.length) { return invoiceTags.tags.map(tagInfo => tagInfo.id) } }
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
Teste 1
Teste 2
Fastest:
N/A
Slowest:
N/A
Latest run results:
No previous run results
This benchmark does not have any results yet. Be the first one
to run it!
Comments
Confirm delete:
Do you really want to delete benchmark?