Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
me vs chatgpt
(version: 1)
Comparing performance of:
Me vs Chatgpt
Created:
one year ago
by:
Guest
Jump to the latest result
HTML Preparation code:
<!--your preparation HTML code goes here-->
Script Preparation code:
/*your preparation JavaScript code goes here To execute async code during the script preparation, wrap it as function globalMeasureThatScriptPrepareFunction, example:*/ async function globalMeasureThatScriptPrepareFunction() { // This function is optional, feel free to remove it. // await someThing(); }
Tests:
Me
const arr = [8, 9, 3, 9, 6, 5, 1, 7, 3, 9, 4, 1, 7, 2, 8, 3, 2, 1, 4, 7]; const small5 = [arr[0]]; const big5 = [arr[0]]; for (const n of arr.slice(1)) { if (n < small5[4] || small5.length < 5) { for (let i = 0; i < 5; ++i) { if (n < small5[i] || i === small5.length - 1) { small5.splice(i, 0, n); break; } } } if (n > big5[4] || big5.length < 5) { for (let i = 0; i < 5; ++i) { if (n > big5[i]) { big5.splice(i, 0, n); break; } else if (i === big5.length - 1) { big5.push(n); break; } } } } let total = 0; for (let i = 0; i < 5; ++i) { total += small5[i] + big5[i]; }
Chatgpt
const arr = [8, 9, 3, 9, 6, 5, 1, 7, 3, 9, 4, 1, 7, 2, 8, 3, 2, 1, 4, 7]; const small5 = []; const big5 = []; for (const n of arr) { // Maintain 5 smallest numbers if (small5.length < 5 || n < small5[4]) { small5.push(n); small5.sort((a, b) => a - b); // Ensure the smallest numbers are sorted if (small5.length > 5) small5.pop(); // Keep only the smallest 5 } // Maintain 5 largest numbers if (big5.length < 5 || n > big5[4]) { big5.push(n); big5.sort((a, b) => b - a); // Ensure the largest numbers are sorted if (big5.length > 5) big5.pop(); // Keep only the largest 5 } } // Calculate the total sum const total = small5.reduce((sum, num) => sum + num, 0) + big5.reduce((sum, num) => sum + num, 0);
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
Me
Chatgpt
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/131.0.0.0 Safari/537.36
Browser/OS:
Chrome 131 on Windows
View result in a separate tab
Embed
Embed Benchmark Result
Test name
Executions per second
Me
707017.1 Ops/sec
Chatgpt
221905.9 Ops/sec
Related benchmarks:
Test for
Test for
Benchmark GTM
PIMEc TEST
object emptyness big object
Decimal.js vs Native
Test array concat
Test array concat with larger array
213find vs findIndex vs some (Array prototype methods)
Comments
Confirm delete:
Do you really want to delete benchmark?