Re:Vstr: C string library designed to work optimally with ve...
by kevingadd on Tuesday March 10, 2020 @09:02AM
(#22535026)
If your strings are short that's basically O(1), which could be nice for some workloads - enums, json keys, etc.
[ Parent
| on HN ]
Re:Vstr: C string library designed to work optimally with ve...
by jacwah on Tuesday March 10, 2020 @09:30AM
(#22535250)
That's not what O(1) means. If your strings are short, complexity doesn't matter either way.
Re:Vstr: C string library designed to work optimally with ve...
by leetcrew on Tuesday March 10, 2020 @10:00AM
(#22535481)
if all your strings are of size < c, you can do any string operation on a single string in constant time.
Re:Vstr: C string library designed to work optimally with ve...
by saagarjha on Tuesday March 10, 2020 @03:58PM
(#22539020)
There are certain (randomized) operations that you can’t…
Re:Vstr: C string library designed to work optimally with ve...
by admax88q on Tuesday March 10, 2020 @09:31AM
(#22535264)
That's still misleading.
If all my input is small then O(n^2) is basically O(1) as well.
Re:Vstr: C string library designed to work optimally with ve...
by naniwaduni on Tuesday March 10, 2020 @12:04PM
(#22536617)
Everything is O(1) when you have finite bounded input.