Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Deneme
(version: 1)
dede
Comparing performance of:
Deneme 1 vs Deneme 2
Created:
7 years ago
by:
Registered User
Jump to the latest result
HTML Preparation code:
written by <a href="https://www.okeyy.net/okey" title="Okey">Okey<a/> oyunu
Script Preparation code:
var yazi = 'ÖKÜZ MÜSÜN LAN'; var IRCLowerTable = [ /* x00-x07 */ '\x00', '\x01', '\x02', '\x03', '\x04', '\x05', '\x06', '\x07', /* x08-x0f */ '\x08', '\x09', '\x0a', '\x0b', '\x0c', '\x0d', '\x0e', '\x0f', /* x10-x17 */ '\x10', '\x11', '\x12', '\x13', '\x14', '\x15', '\x16', '\x17', /* x18-x1f */ '\x18', '\x19', '\x1a', '\x1b', '\x1c', '\x1d', '\x1e', '\x1f', /* ' '-x27 */ ' ', '!', '"', '#', '$', '%', '&', '\x27', /* '('-'/' */ '(', ')', '*', '+', ',', '-', '.', '/', /* '0'-'7' */ '0', '1', '2', '3', '4', '5', '6', '7', /* '8'-'?' */ '8', '9', ':', ';', '<', '=', '>', '?', /* '@'-'G' */ '@', 'a', 'b', 'c', 'd', 'e', 'f', 'g', /* 'H'-'O' */ 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', /* 'P'-'W' */ 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', /* 'X'-'_' */ 'x', 'y', 'z', '{', '|', '}', '~', '_', /* '`'-'g' */ '`', 'a', 'b', 'c', 'd', 'e', 'f', 'g', /* 'h'-'o' */ 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', /* 'p'-'w' */ 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', /* 'x'-x7f */ 'x', 'y', 'z', '{', '|', '}', '~', '\x7f', /* x80-x87 */ '\x80', '\x81', '\x82', '\x83', '\x84', '\x85', '\x86', '\x87', /* x88-x8f */ '\x88', '\x89', '\x8a', '\x8b', '\x8c', '\x8d', '\x8e', '\x8f', /* x90-x97 */ '\x90', '\x91', '\x92', '\x93', '\x94', '\x95', '\x96', '\x97', /* x98-x9f */ '\x98', '\x99', '\x9a', '\x9b', '\x9c', '\x9d', '\x9e', '\x9f', /* xa0-xa7 */ '\xa0', '\xa1', '\xa2', '\xa3', '\xa4', '\xa5', '\xa6', '\xa7', /* xa8-xaf */ '\xa8', '\xa9', '\xaa', '\xab', '\xac', '\xad', '\xae', '\xaf', /* xb0-xb7 */ '\xb0', '\xb1', '\xb2', '\xb3', '\xb4', '\xb5', '\xb6', '\xb7', /* xb8-xbf */ '\xb8', '\xb9', '\xba', '\xbb', '\xbc', '\xbd', '\xbe', '\xbf', /* xc0-xc7 */ '\xe0', '\xe1', '\xe2', '\xe3', '\xe4', '\xe5', '\xe6', '\xe7', /* xc8-xcf */ '\xe8', '\xe9', '\xea', '\xeb', '\xec', '\xed', '\xee', '\xef', /* xd0-xd7 */ '\xf0', '\xf1', '\xf2', '\xf3', '\xf4', '\xf5', '\xf6', '\xd7', /* xd8-xdf */ '\xf8', '\xf9', '\xfa', '\xfb', '\xfc', '\xfd', '\xfe', '\xdf', /* xe0-xe7 */ '\xe0', '\xe1', '\xe2', '\xe3', '\xe4', '\xe5', '\xe6', '\xe7', /* xe8-xef */ '\xe8', '\xe9', '\xea', '\xeb', '\xec', '\xed', '\xee', '\xef', /* xf0-xf7 */ '\xf0', '\xf1', '\xf2', '\xf3', '\xf4', '\xf5', '\xf6', '\xf7', /* xf8-xff */ '\xf8', '\xf9', '\xfa', '\xfb', '\xfc', '\xfd', '\xfe', '\xff' ]; var KucukIsim = function(x) { var mal = ''; for(var i=0;i<x.length;i++) { var l = IRCLowerTable[x.charCodeAt(i)]; mal += l || x.charAt(i); } return mal; }
Tests:
Deneme 1
KucukIsim(yazi);
Deneme 2
yazi.toLowerCase();
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
Deneme 1
Deneme 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!
Autogenerated LLM Summary
(model
llama3.2:3b
, generated one year ago):
Let's dive into the world of JavaScript microbenchmarks. **Benchmark Definition JSON** The provided JSON represents a benchmark definition for a JavaScript function called `KucukIsim`. This function takes a string input `x` and returns a new string where all characters are converted to lowercase using an array `IRCLowerTable`. Here's what's being tested: * The `KucukIsim` function is executed with two different inputs: the original string `yazi` (which contains Turkish characters) and the `toLowerCase()` method of the same string. * The benchmark measures the execution time of these two approaches. **Comparison Options** Two options are compared: 1. **Custom implementation**: The `KucukIsim` function is implemented using a custom approach, which involves iterating over each character in the input string and replacing it with its lowercase equivalent from the `IRCLowerTable` array. 2. **Built-in method**: The `toLowerCase()` method of JavaScript strings is used to achieve the same result. **Individual Test Cases** There are two individual test cases: 1. **Deneme 1**: The custom implementation of `KucukIsim` is executed with the input string `yazi`. 2. **Deneme 2**: The built-in `toLowerCase()` method is applied to the input string `yazi`. **Latest Benchmark Results** The latest results show that: * The custom implementation (`KucukIsim`) outperforms the built-in `toLowerCase()` method for this specific benchmark. * Both approaches have a high execution rate, with over 5 million executions per second on a Chrome 71 browser running on a Windows desktop. **Implications** These results suggest that for certain types of string processing tasks, custom implementations can be faster than relying on built-in methods. However, it's essential to note that this might not always be the case, and other factors like memory allocation, cache efficiency, and platform-specific optimizations can influence performance. The use of `IRCLowerTable` also implies a specific cultural or linguistic context, where Turkish characters have special casing requirements. In general, benchmarking should consider the specific requirements and constraints of the problem domain to ensure accurate comparisons.
Related benchmarks:
eval vs new Function, encoded arrays
Lodash vs VanilaJS
Lodash vs VanilaJS lkjf
Bitwise NOT VS Number
Comments
Confirm delete:
Do you really want to delete benchmark?