Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
Клавиатура
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Mobile Safari/537.36
Browser:
Chrome Mobile 134
Operating system:
Android
Device Platform:
Mobile
Date tested:
one year ago
Строки
23.3M/s
Slice
13.1M/s
Массивы
2K/s
View exact numbers
Test name
Executions per second
✓
Строки
23,346,570 Ops/sec
Slice
13,101,584 Ops/sec
Массивы
2,193 Ops/sec
Script Preparation code:
var position = 20; var testString = "А еще можно символы в массиве хранить. Сплайсом вставлять символ и джойнить перед выводом"; var testArray = testString.split ``; var newChar = "X";
Tests:
Массивы
testArray.splice(position, 0, newChar); let result = testArray.join``;
Строки
let result = testString.substring(0, position) + newChar + testString.substring(position)
Slice
let result = testString.slice(0, position) + newChar + testString.slice(position)