Skip to content

Chtau/StringTest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

StringTest

Compare String function for the best Performance

All Test are made with a String of a 1 MB Size.

Every test function will add the String 50 times together and this will be repeated 20 times per function.



Test Environment

CPU: Intel i7 6900K @ 4.29 GHz

MEM: 64 GB

SSD: Samsung 960 Pro NVE

Windows 10 Pro x64 (latest updates @ 19.10.2017)



Test .Net Framework 4.0
Function avg MS min MS max MS max Memory (MB)
String3 23 18 35 623.5
String7 24 18 31 513.6
String9 24 23 25 224.6
String11 24 23 25 224.6
String8 24 23 25 224,6
String10 24 23 25 224.6
String2 331 329 335 228.3
String1 332 326 343 228.2
String5 335 329 341 521.4
String4 662 644 675 896.4


Test .Net Core 2.0
Function avg MS min MS max MS max Memory (MB)
String10 24 22 24 221.3
String8 24 22 24 221.3
String11 24 23 24 221.3
String9 24 23 27 221.3
String7 24 18 37 618.2
String3 24 18 37 618.2
String5 332 326 339 516
String1 335 326 339 222.7
String2 337 332 339 222.8
String4 667 663 674 516.5

Test Environment

CPU: Intel i5 4590 @ 3.30 GHz

MEM: 16 GB

SSD: Crucial SATA

Windows 7 Pro SP1 x64 (latest updates @ 23.10.2017)



Test .Net Framework 4.0
Function avg MS min MS max MS max Memory (MB)
String9 28 21 39 426.8
String8 28 24 33 310.6
String3 29 20 43 520.6
String7 29 20 42 603.6
String10 29 21 42 426.8
String11 29 21 41 426.8
String2 381 367 416 512.8
String5 382 357 445 895.1
String1 385 371 418 1024
String4 802 726 928 1228.8


Test .Net Core 2.0
Function avg MS min MS max MS max Memory (MB)
String3 28 20 39 619.5
String8 30 24 39 421.5
String10 30 23 39 421.5
String11 31 22 43 421.5
String7 32 21 62 1024
String9 33 23 49 421.5
String1 376 361 426 421.5
String2 381 365 415 507.1
String5 403 370 447 1228.8
String4 771 727 822 1228.8




*MS = Milliseconds

look in the Source Files to see how the string functions are implemented