On Wed, Nov 20, 2019 at 07:32:45PM +0100, Ján Tomko wrote:
> For checking whether a substring is present in a string,
> using the pattern:
>     "str" in string
> is slightly faster than:
>     string.find("str") != -1
>
> Use it to shave off 4 % of the runtime of this script that
> processes quite a few long source files.
>

This is also the case in python FWIW...

> Signed-off-by: Ján Tomko <[email protected]>
> ---

Reviewed-by: Erik Skultety <[email protected]>

--
libvir-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/libvir-list

Reply via email to