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
FannoFlow: The most important benchmark i think is benching the str* functions with chars and cellstrs vs the string member methods
[8:41 PM] FannoFlow: Like join, erase, starts with, split, etc etc
[8:41 PM] FannoFlow: The container itself might have overhead, but it's the usability of the container
[8:57 PM] FannoFlow: !run
data = '1.21, a, 1.985, b, 1.955, c, 2.015, d, 1.885';
datasting = string(data)
tcellstr = timeit(@() str2double(erase(strsplit(data, ','),lettersPattern)))
tstring = timeit(@() datasting.split(",").erase(lettersPattern).double())
[8:57 PM]
BOT
MATLAB:
datasting =
"1.21, a, 1.985, b, 1.955, c, 2.015, d, 1.885"
tcellstr =
3.2287e-04
tstring =
2.9424e-05
[8:57 PM] FannoFlow: string ops order of magnitude faster
[8:57 PM] FannoFlow: and so much cleaner to read
[8:58 PM] FannoFlow: probs could be written a bit better to use more str functions
[8:58 PM] FannoFlow: but thats the idea, the comparison of cellstr operations to string array operations
[8:59 PM] FannoFlow: could do some big regex pattern search too or something
The text was updated successfully, but these errors were encountered:
FannoFlow: The most important benchmark i think is benching the str* functions with chars and cellstrs vs the string member methods
[8:41 PM] FannoFlow: Like join, erase, starts with, split, etc etc
[8:41 PM] FannoFlow: The container itself might have overhead, but it's the usability of the container
[8:57 PM] FannoFlow: !run
data = '1.21, a, 1.985, b, 1.955, c, 2.015, d, 1.885';
datasting = string(data)
tcellstr = timeit(@() str2double(erase(strsplit(data, ','),lettersPattern)))
tstring = timeit(@() datasting.split(",").erase(lettersPattern).double())
[8:57 PM]
BOT
MATLAB:
datasting =
tcellstr =
3.2287e-04
tstring =
2.9424e-05
[8:57 PM] FannoFlow: string ops order of magnitude faster
[8:57 PM] FannoFlow: and so much cleaner to read
[8:58 PM] FannoFlow: probs could be written a bit better to use more str functions
[8:58 PM] FannoFlow: but thats the idea, the comparison of cellstr operations to string array operations
[8:59 PM] FannoFlow: could do some big regex pattern search too or something
The text was updated successfully, but these errors were encountered: