Many operations involving two literals are optimized (to a certain level). So it sort of surprises me that literal comparisons are not optimized and literal contains only convert the right operand to a constant if possible. I'd like to implement optimizations for these especially for the literal contains. There is a TODO in the ast optimizer for literal comparisons as well, and that's another reason I would like to have these added. _______________________________________________ Python-Dev mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/[email protected]/message/5I2GXLMVZ6OOLACL2BB2ER4L2RKEGWIJ/ Code of Conduct: http://python.org/psf/codeofconduct/
- [Python-Dev] Optimizing literal comparisons and ... Jeremiah Vivian
- [Python-Dev] Re: Optimizing literal compari... Skip Montanaro
- [Python-Dev] Re: Optimizing literal compari... raymond . hettinger
- [Python-Dev] Re: Optimizing literal com... Mark Shannon
- [Python-Dev] Re: Optimizing literal... Skip Montanaro
- [Python-Dev] Re: Optimizing lit... Serhiy Storchaka
- [Python-Dev] Re: Optimizin... Eric V. Smith
- [Python-Dev] Re: Optim... Rob Cliffe via Python-Dev
- [Python-Dev] Re: O... Christopher Barker
- [Python-Dev] Re: O... Eric V. Smith
- [Python-Dev] Re: O... MRAB