Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
RegEx vs Reduce
(version: 0)
Comparing performance of:
Regex vs Reduce
Created:
one year ago
by:
Guest
Jump to the latest result
Script Preparation code:
const cookies = 'exp30812=expb; lwprofile=c=us&l=en&s=dhs&cs=19; _gcl_au=1.1.177519547.1727114349; FPAU=1.1.1472330523.1727114340; _gd_visitor=06e81c47-e8bc-4e7e-8f4a-5bc5621254ae; s_ecid=MCMID%7C58125345114906011673180736441655931419; txUid=Cq5xTmbxrHGed787w0v9Ag==; __privaci_cookie_consent_uuid=95977a76-991b-4df0-958f-693035db3c63:50; __privaci_cookie_consent_generated=95977a76-991b-4df0-958f-693035db3c63:50; dell_consent_map=139%7C140; d_vi=97922e17693e000072acf166ec01000073b70200; _cls_v=cfd1bdbe-aac9-421d-8247-45f36a00bab0; __privaci_latest_published_version=21; _cs_c=0; _evga_b184={%22uuid%22:%2209275fa4c59e7b79%22}; _sfid_c405={%22anonymousId%22:%2209275fa4c59e7b79%22%2C%22consents%22:[]}; ajs_anonymous_id=5b02be86-4414-4f54-981f-30ff59cb7d4e; _fbp=fb.1.1727114355228.533712941; _fbp=fb.1.1727114355228.533712941; _pin_unauth=dWlkPU5XTmlObUkxTmprdE16Y3haQzAwTlRBM0xXRXdPV0l0WTJZM1lqSmtNV0U1TXpjNA; __privaci_cookie_consents={"consents":{"3":1,"139":1,"140":1},"location":"SP#BR","lang":"en","gpcInBrowserOnConsent":false,"gpcStatusInPortalOnConsent":true,"status":"record-consent-success","implicit_consent":false}; _scid=yFhAz6_yji0RFGDwnBTRhQJtDEncOZG4; signupemail-modal-visited=1; user_isreturn=true; __prz_uid=4c409662-a055-4e2e-bf53-f22e7ecf7694; _ga_7VPTY6P20D=GS1.2.1727379219.1.0.1727379219.60.0.0; _ga_C7Y31W5J2C=GS1.1.1727379215.1.0.1727379256.19.0.0; _ga_34M880E5ZS=GS1.1.1727461288.1.1.1727461555.58.0.0; akGD=%7B%22country%22%3A%22US%22%2C%22region%22%3A%22TX%22%7D; dais-c=9dphbC5OzAb9/BqDJj8tcOo5Yw6TV3rQtLh+Lrjv+zSYcosldN3hYlE/7J/iVXaHOZm8+HmpyUv1Go9v5PMdSw==; SessionID=3c407f08-81e7-41b3-b40f-be1c9573ff32; _evga_f3ab={%22uuid%22:%2209275fa4c59e7b79%22}; IPE120994=IPE120994; BVBRANDID=7ad70eeb-5d2a-420a-830e-bfdcba59ed10; _an_uid=7385743897136271410; _ScCbts=%5B%5D; _tt_enable_cookie=1; _ttp=W2LqsEq9b2xrJpwGtSOAaQWXBVm; mktrecipe=b; _scid_r=7thAz6_yji0RFGDwnBTRhQJtDEncOZG4VwzuwQ; __pr.4w9c6n=rk-_jIRnQZ; motion=enabled; __pdst=efd2622ba0234c66b4bea5fa65389e13; kndctr_4DD80861515CAB990A490D45_AdobeOrg_identity=CiY1ODEyNTM0NTExNDkwNjAxMTY3MzE4MDczNjQ0MTY1NTkzMTQxOVIQCMHX%5FKSiMhgBKgNPUjIwA%5FAB2uyQ6aYy; _gid=GA1.2.1319291601.1728414321; _ga_SSZELZLKD8=GS1.2.1728414321.7.0.1728414321.0.0.0; _ga=GA1.1.669380875.1727114349; FPLC=Waxyd%2FbMlTfM%2FlfA90rJBvbFS8x7771%2FydBx2ZFV1jjW%2Bmq87LAmu6Lazrvcbj9lnD97Noe%2BkVLsOwVvIE%2F0%2FQyc%2FXqZRHI9iPAF82whO2XfLMq9lqTU%2FeDyC6JLEg%3D%3D; AMCV_4DD80861515CAB990A490D45%40AdobeOrg=1999109931%7CMCIDTS%7C20006%7CMCMID%7C58125345114906011673180736441655931419%7CMCAID%7CNONE%7CMCOPTOUT-1728490383.168%7CNONE%7CvVersion%7C5.5.0%7CMCAAMLH-1729095243%7C9%7CMCAAMB-1729095243%7Cj8Odv6LonN4r3an7LhD3WZrU1bUpAkFkkiY1ncBR96t2PTI; check=true; rumCki=false; dc-ctxt=c=US&l=en&sdn=work; dell_cmp_consent={"s":1,"m":1,"e":1}; s_ips=911; cidlid=%3A%3A; s_cc=true; _lr_geo_location=BR; VOCAAS_SESSION_ID=D88C5CE3A40FADB6986E0EE69D8630CA; _gd_session=a113386a-a895-4662-8c15-12d04b058798; d_dnb=true; _cls_s=552c4937-c132-4490-9b98-145987172ba4:1; s_sq=%5B%5BB%5D%5D; ctaReferrerURL=https://www.dell.com/pt-br/dt/apex/index.htm; ipe_s=cb5878c3-965e-0c41-7a0d-4c715f6aeefa; _cs_cvars=%7B%7D; ipe.184.pageViewedCount=1; ipe.184.pageViewedDay=283; ipe_184_fov=%7B%22numberOfVisits%22%3A10%2C%22sessionId%22%3A%22cb5878c3-965e-0c41-7a0d-4c715f6aeefa%22%2C%22expiry%22%3A%222024-10-23T17%3A59%3A42.697Z%22%2C%22lastVisit%22%3A%222024-10-09T16%3A44%3A54.032Z%22%7D; _ga_16419196=GS1.1.1727114349.12.1.1728493328.0.0.0; _ga_16418520=GS1.1.1727114349.12.1.1728493328.0.0.0; s_c49=c%3Dus%26l%3Den%26s%3Dgen%26cs%3Duscorp1; gpv_pn=dell.com%20responsive%20homepage; s_ppv=dell.com%2520responsive%2520homepage%2C11%2C11%2C11%2C911%2C9%2C1; s_vnc365=1760030649066%26vn%3D16; s_ivc=true; lwp=c=us&l=en&s=bsd&cs=04; _cs_mk=0.1684670806038877_1728494649336; mbox=PC#c99898cabf764df28c0aa5cd8b8bc120.35_0#1791739450|session#77be40358eec448daa531b7f96b44706#1728496510; mboxEdgeCluster=35; adcloud={%22_les_v%22:%22y%2Cdell.com%2C1728496449%22}; _abck=6CA74C0FAFF0D2B11F34EFF5D879AC12~-1~YAAQzzovF+JQZ2+SAQAAKz1Pcgz3Rijf4GjXBZ6jj/vrDcgXUHNAPm64BCY56HrDXUeM3gSHxlsGOyErlEKUFHx/ybJYQfzYodud4s1k5AmTLl4ZNt0105Dagvx0NjXufPMRw7wptERZu9w76p9zzjDe9CwHDsT5UT9w5JaQDwGhShqdNaUPtSnz3dcus+tbo5qwu5xC9YjaouolXUQOW7Mspsk6riDtegnvoA15Y02ZpM9u8XUWpGFa5K8NrAdh/ggLBDqnjzgipoTIrZ9J1+l7Y3md7exoULUeNZOBfnOWzeu7d1f7NrRbHFUAanwldMQWpqywmk4SM/MMgLLTDM7cP7Gwbnwq256jQB6Djbfssb+SnbU/nS3YRI/OkQDsX7W1lVBIBv6gLY0Jb8/3S7PB+WXflUGbGz899sA1~-1~-1~1727664680; _uetsid=474042a0858b11ef84f8675a17c23498; _uetvid=1340349079d511efbfcad53d2e20caf8; _ga_1234567890=GS1.1.1728492254.14.1.1728494650.0.0.1845933356; _rdt_uuid=1727114355183.3defde7c-ecbd-45c7-8e84-2d42f19262e3; FPGSID=1.1728494649.1728494649.G-2KWM544HR9.fbp-A5nnif4OdQ061qvPkw; s_tp=8355; _cs_id=26752e83-d5ee-a85f-ba3a-86a1a7380e85.1727114155.15.1728494655.1728492292.1709063960.1761278155952.1; _cs_s=2.5.0.1728496627491';
Tests:
Regex
function getCookie(cookieName) { const results = document.cookie.match('(^|;) ?' + cookieName + '=([^;]*)(;|$)'); if (results) { return decodeURIComponent(results[2]); } return null; } const value = getCookie('s_ivc');
Reduce
function getCookie(cookieName) { return document.cookie.split('; ').reduce((prev, curr) => { const [name, value] = curr.split('='); return name === cookieName ? decodeURIComponent(value) : prev; }, null); } const value = getCookie('s_ivc');
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
Regex
Reduce
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
one year ago
)
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36
Browser/OS:
Chrome 129 on Windows
View result in a separate tab
Embed
Embed Benchmark Result
Test name
Executions per second
Regex
2277560.5 Ops/sec
Reduce
1316080.2 Ops/sec
Autogenerated LLM Summary
(model
llama3.2:3b
, generated one year ago):
I'll do my best to provide a helpful answer. However, I notice that the input text is quite lengthy and contains a mix of HTML, JavaScript code, and benchmark results. It's likely that this data is related to a web application or a benchmarking test. To make an informed response, I would need more specific information about what you're trying to accomplish or solve. Could you please clarify your question or provide more context? That being said, if you'd like me to analyze the provided benchmark results and extract some insights from them, I can try to do so. Please let me know what kind of analysis you're interested in (e.g., performance comparison between different test cases, identifying trends in execution speed, etc.).
Related benchmarks:
Benchmark b62c8ffd-0b9f-4f90-a558-4539bdf7335c
Ga cookie grabber . 2
test dv vs fm real
Regexp vs split cookie
Comments
Confirm delete:
Do you really want to delete benchmark?