zlacker

[parent] [thread] 0 comments
1. hknmtt+(OP)[view] [source] 2024-01-24 11:34:53
a) why not use switch { case len(a) < len(b): b = b[:len(a)] case len(b) < len(a): a = a[:len(b)] }

b) do you know the usual length of the slices? if so, can't you autogenerate/manually write switch to manually do the math? how would that perform?

[go to top]