Yury Selivanov added the comment: > I like this idea! I like the limitations to positional-only calls. I do think > that it would be nice if we could speed up C calls too -- today, > s.startswith('abc') is slower than s[:3] == 'abc' precisely because of the > lookup. But I'm all for doing this one step at a time, so we can be sure it > is solid before taking the next step(s).
Yes, I think we can make `<built-in type>.method(..)` calls much faster with LOAD_METHOD. Since those types lack `__dict__` and their `__class__` is read-only, we can use a far better optimized code path without extra lookups and creation of BoundMethod/PyCFunction objects. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26110> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com