I do a foreach loop for 1_000_000 repetitions of the "yacht is the sea with a man in the sky" line discussed above, and compare it to regex.
Results:
1280 ms - for loop
1137 ms - regex
the for loop loses an average of 100 ms. LINQ is slower - 1809 ms
Summary: regex is the fastest and most obvious - really best practice)))
this is amazing! I didn't know you can do this here
Looks to be pretty slow
On my side the regex code is twice as slow as a for loop (2526 ms vs 1149 ms).
Thanks better late than never on the reply :)
I have tested it and it is correct here and in other solutions too)
I do a foreach loop for 1_000_000 repetitions of the "yacht is the sea with a man in the sky" line discussed above, and compare it to regex.
Results:
1280 ms - for loop
1137 ms - regex
the for loop loses an average of 100 ms. LINQ is slower - 1809 ms
Summary: regex is the fastest and most obvious - really best practice)))
This comment is hidden because it contains spoiler information about the solution
I'm coming from Javascript. How C # is different. I will have to study hard. JS is very abstract, but C # ... I will suffer a little, but I like it.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
gave this a bestPractice ... but how would I know? I am beginner... is it BP?
penetrating
This comment is hidden because it contains spoiler information about the solution
case: yacht is the sea with man in the sky -
result is not correct... other solutions too...
This comment is hidden because it contains spoiler information about the solution
Loading more items...