Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
teatastaasag
(version: 0)
Comparing performance of:
pop vs shift vs length vs reassignment vs .splice(0)
Created:
5 years ago
by:
Guest
Jump to the latest result
Script Preparation code:
var array = []; var test = { "response_code": "100", "order_id": "2244961", "acquisition_date": "2020-07-26 07:09:45", "ancestor_id": "asgdasgsag", "affiliate": "AFDDL", "afid": "", "sid": "asga5s", "affid": "AFasgL", "c1": "8asg03", "c2": "QVaagdagBfbWFzdGVy", "c3": "318842aaga723", "aid": "", "opt": "", "amount_refunded_to_date": "0121", "auth_id": "Not Available", "billing_city": "afdafa", "billing_country": "asf", "billing_cycle": "0", "billing_first_name": "afadsfasf", "billing_last_name": "afdafa", "billing_postcode": "fdasfasfas", "billing_state": "fasfas", "billing_state_id": "CasO", "billing_street_address": "8safasfs", "billing_street_address2": "", "campaign_id": "95235244", "cc_expires": "327441223", "cc_first_6": "402141126", "cc_last_4": "6582130", "cc_number": "494124140", "credit_card_number": "2421412124124412412141", "cc_orig_first_6": "06-21126", "cc_orig_last_4": "930", "cc_type": "473475347", "chargeback_date": "", "check_account_last_4": "", "check_routing_last_4": "", "check_ssn_last_4": "", "check_transitnum": "", "child_id": "238512414848,24141449360,14142450094,2451414402,24554141852,412461154,2464041401,241466459", "click_id": "", "created_by_user_name": "3745347", "created_by_employee_name": "37543shil", "coupon_discount_amount": "0.00", "coupon_id": "", "credit_applied": "0.00", "promo_code": "", "customer_id": "227247887180", "customers_telephone": "9229991306", "decline_salvage_discount_percent": "0", "decline_reason": "", "decline_reason_details": "", "email_address": "4375437834874387@gmail.com", "first_name": "3568358538538", "gateway_id": "544358365835835", "gateway_descriptor": "53685385865497649467946", "hold_date": "", "ip_address": "5865385387358358563856", "is_blacklisted": "0", "is_chargeback": "0", "is_fraud": "0", "is_recurring": "0", "is_refund": "no", "is_rma": "0", "is_test_cc": "0", "is_void": "no", "last_name": "3586358358t", "main_product_id": "3586", "main_product_quantity": "1", "next_subscription_product": "", "next_subscription_product_id": "", "on_hold": "0", "on_hold_by": "", "order_confirmed": "NO_STATUS", "order_confirmed_date": "", "order_sales_tax": "0.00", "order_sales_tax_amount": "0.00", "shipping_amount": "0.00", "order_status": "2", "order_total": "0.00", "parent_id": "22449245624761", "prepaid_match": "No", "preserve_gateway": "1", "processor_id": "", "rebill_discount_percent": "0", "current_rebill_discount_percent": "0", "recurring_date": "2020-08-26", "refund_amount": "0.00", "refund_date": "", "retry_date": "", "rma_number": "", "rma_reason": "", "return_reason": "", "shipping_city": "247547427427427", "shipping_country": "US", "shipping_date": "N42754274274d", "shipping_first_name": "M42745724724", "shipping_id": "3", "shipping_last_name": "27542724742742t", "shipping_method_name": "256262462", "shipping_postcode": "81624564256154", "shipping_state": "CO245624624", "shipping_state_id": "247542742", "shipping_street_address": "42574742742724 Rd", "shipping_street_address2": "", "sub_affiliate": "257247247245724572423", "time_stamp": "2456246", "tracking_number": "", "transaction_id": "25642624624", "upsell_product_id": "", "upsell_product_quantity": "", "void_amount": "0.00", "void_date": "", "shippable": "0", "website_received": "", "website_sent": "", "is_cascaded": "0", "stop_after_next_rebill": "0", "next_gateway_id": "544" } for(var i = 0; i < 200000; i++){array.push(test);}
Tests:
pop
while (array.length > 0) { array.pop(); }
shift
while (array.length > 0) { array.shift(); }
length
array.length = 0
reassignment
array = []
.splice(0)
array.splice(0);
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (5)
Previous results
Fork
Test case name
Result
pop
shift
length
reassignment
.splice(0)
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!
Autogenerated LLM Summary
(model
llama3.2:3b
, generated one year ago):
It seems like you're providing the output of an automated test suite, possibly generated by a tool like Selenium or Jest. I'll do my best to help you decipher the contents. The structure appears to be a JSON object containing metadata about a test run. It includes: 1. **Test Cases**: A list of individual test cases with their definitions and names. 2. **Raw UA String**: The User Agent string used by a specific browser to execute the tests. 3. **Browser**, **DevicePlatform**, and **OperatingSystem**: Information about the browser, device platform, and operating system used for the tests. 4. **ExecutionsPerSecond**: A measure of how many times each test was executed per second during the test run. The individual test cases seem to be related to array manipulation in JavaScript: * `pop`, `shift`, `.splice(0)`, and `reassignment` are all test names that likely correspond to specific tests. * The benchmark definitions for these tests might look something like this: + `while (array.length > 0) { array.pop(); }` + `while (array.length > 0) { array.shift(); }` + `array.splice(0);` + `array = [];` The latest benchmark result shows performance data for each test case, including the number of executions per second. Is there a specific question or aspect of this output you'd like me to help with?
Related benchmarks:
Compare objects
test lodash vs js vanilla
Test HOY
Object, If, Ternary or Switch
Comments
Confirm delete:
Do you really want to delete benchmark?