You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since the key logic is that given the plain string, find the respond unicode string, the unordered_map is better.
I did some simple test case for both, below are the test result:
std::unordered_map version:
Elapsed time: 0.000145379 s
Elapsed time: 0.000127852 s
Elapsed time: 0.00012735 s
Elapsed time: 0.00012398 s
Elapsed time: 0.000123349 s
Elapsed time: 0.000126856 s
std::map version:
Elapsed time: 0.000279197 s
Elapsed time: 0.000269347 s
Elapsed time: 0.000259659 s
Elapsed time: 0.000255836 s
Elapsed time: 0.000258944 s
Elapsed time: 0.000256731 s
The text was updated successfully, but these errors were encountered:
Since the key logic is that given the plain string, find the respond unicode string, the unordered_map is better.
I did some simple test case for both, below are the test result:
std::unordered_map version:
Elapsed time: 0.000145379 s
Elapsed time: 0.000127852 s
Elapsed time: 0.00012735 s
Elapsed time: 0.00012398 s
Elapsed time: 0.000123349 s
Elapsed time: 0.000126856 s
std::map version:
Elapsed time: 0.000279197 s
Elapsed time: 0.000269347 s
Elapsed time: 0.000259659 s
Elapsed time: 0.000255836 s
Elapsed time: 0.000258944 s
Elapsed time: 0.000256731 s
The text was updated successfully, but these errors were encountered: