Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Why is Python 3.7 fastest

Why is Python 3.7 fastest

CPython 3.7 버전이 릴리즈되면서 많은 성능 최적화가 이루어졌습니다.
파이썬 시작 시간이 최대 30% 감소했을 뿐 아니라 클래스의 함수 호출이 20% 빨라졌고, 15배 빨라진 asyncio, 7배 빨라진 typing 모듈, 자주쓰이는 함수인 sorted, dict.copy가 각각 40%, 5.5배 빨라졌으며 이외에도 다양한 부분에서 성능 개선이 이루어지면서 파이썬 3.7은 가장 빠른 CPython 버전이 되었습니다.
본 세션에선 코드 레벨, 필요하다면 C언어 구현단까지 들어가 이전코드와 개선된 코드를 비교하며 어떻게 극적인 또 전반적인 성능 개선이 이루어졌는지 알아봅니다.

레퍼런스 - https://docs.python.org/3/whatsnew/3.7.html#optimizations

Winter Jung

August 17, 2019
Tweet

More Decks by Winter Jung

Other Decks in Programming

Transcript

  1. • 3~5ߓ ࡈۄ૓ os.walk() ೣࣻ • bytes(int) ѐࢶ • 10%

    ࡈۄ૓ ੿ӏ಴അध ౵य • 25% ࡈۄ૓ property() getter ഐ୹ • ١١ ੗ੜೠ ѐࢶ !6 Python 3.5 Optimizations ߊ಴ ࣗѐ
  2. • C۽ ҳഅೠ asyncio.Future, asyncio.Task • 30ߓ ࡅܲ typing ݽٕ

    • ~4ߓ ࡈۄ૓ os.scandir() !7 Python 3.6 Optimizations ߊ಴ ࣗѐ
  3. !24 ଵҊ۽ 2017֙ 2ਘࠗఠ CPython ѐߊ਷ hgীࢲ GitHubਵ۽ ੉زೣ ੉ग౟ېఊب

    GitHub Issueܳ ࢎਊೞ੗ח PEP-581੉ थੋغয ૓೯ ઺ ߊ಴ ࣗѐ
  4. • ੷ب C ੜ ݽܵפ׮ • ࢜܂ѱ ୶оػ OPCODE੄ ࣁࠗ

    ҳഅҗ line by line ೧ࢳ • 2,000઴੉ ֈח re-implement in C PR ܻ࠭ೞӝ • ੿ӏ ಴അध ౵ࢲ ৮੹ ੿ࠂ !29 য়ט ݈ೞ૑ ঋਸ ղਊ ߊ಴ ࣗѐ
  5. • ࢿמ ѐࢶਸ ਤ೧ যڃ ই੉٣যо ੓঻ա • ؊ ঌҊर׮ݶ

    য٣ܳ ࠁݶ ؼ૑ • Ӓېب ৮੹ য۵૑݅਷ ঋ਷ C ௏٘ !30 য়ט ݈ೡ ղਊ ߊ಴ ࣗѐ
  6. !32 Index 01 ӝࠄ ݫࢲ٘ ഐ୹ 02 ౵੉ॆ द੘ दр

    03 ੋझఢझ ݫࢲ٘ ഐ୹ 04 asyncio.sleep 05 ੉߮౟ ܖ೐ оઉয়ӝ 06 زदী प೯ೞӝ 07 asyncio.ensure_future 08 typing ݽٕ оઉয়ӝ 09 ܻझ౟ ੿۳ 10 ٤࣊ցܻ ࠂࢎ 11 ੿ӏ಴അध __enter__() __exit__()
  7. !34 The overhead of calling many methods of various standard

    library classes implemented in C has been significantly reduced by porting more code to use the METH_FASTCALL convention. bpo-29300 bpo-29507 bpo-29452 bpo-29286 01 ӝࠄ ݫࢲ٘ ഐ୹
  8. • ಴ળ ۄ੉࠳۞ܻী ࣘೠ ௿ېझী ੓ח ৈ۞ ݫࢲٜ٘ਸ ୭੸ച೮׮. •

    METH_FASTCALL ஶ߮࣌ਸ ٮܰب۾ ߄Ծ׮. !35 ੉ ѐࢶ੄ ઱ ղਊ 01 ӝࠄ ݫࢲ٘ ഐ୹
  9. • ಴ળ ۄ੉࠳۞ܻী ࣘೠ ௿ېझী ੓ח ৈ۞ ݫࢲٜ٘ਸ ୭੸ച೮׮. •

    METH_FASTCALL ஶ߮࣌ਸ ٮܰب۾ ߄Ծ׮. !36 ੉ ѐࢶ੄ ઱ ղਊ collections.deque੄ index(), insert(), rotate() 01 ӝࠄ ݫࢲ٘ ഐ୹
  10. • ಴ળ ۄ੉࠳۞ܻী ࣘೠ ௿ېझী ੓ח ৈ۞ ݫࢲٜ٘ਸ ୭੸ച೮׮. •

    METH_FASTCALL ஶ߮࣌ਸ ٮܰب۾ ߄Ծ׮. !37 ੉ ѐࢶ੄ ઱ ղਊ collections.deque੄ index(), insert(), rotate() __getitem__() 01 ӝࠄ ݫࢲ٘ ഐ୹
  11. • ಴ળ ۄ੉࠳۞ܻী ࣘೠ ௿ېझী ੓ח ৈ۞ ݫࢲٜ٘ਸ ୭੸ച೮׮. •

    METH_FASTCALL ஶ߮࣌ਸ ٮܰب۾ ߄Ծ׮. !38 ੉ ѐࢶ੄ ઱ ղਊ collections.deque੄ index(), insert(), rotate() __getitem__() str੄ replace(), ljust(), rjust(), strip(), upper() ١ 01 ӝࠄ ݫࢲ٘ ഐ୹
  12. • ࢤӟѤ opcode୊ۢ ࢤ҂૑݅ ࢎप C ೣࣻ ࢶ঱ ஶ߮࣌ •

    METH_FASTCALL ஶ߮࣌ী ݏ୾ ೣࣻܳ ࢶ঱ೞݶ ࢿמ࢚ ੉ٙ੉ ੓਺ • ӝઓূ METH_VARARGS ஶ߮࣌ ࢎਊ • ౵੉ॆ tuple → PyObject੄ C ߓৌ !40 METH_FASTCALL 01 ӝࠄ ݫࢲ٘ ഐ୹
  13. • ࢤӟѤ opcode୊ۢ ࢤ҂૑݅ ࢎप C ೣࣻ ࢶ঱ ஶ߮࣌ •

    METH_FASTCALL ஶ߮࣌ী ݏ୾ ೣࣻܳ ࢶ঱ೞݶ ࢿמ࢚ ੉ٙ੉ ੓਺ • ӝઓূ METH_VARARGS ஶ߮࣌ ࢎਊ • ౵੉ॆ tuple → PyObject੄ C ߓৌ !41 METH_FASTCALL 01 ӝࠄ ݫࢲ٘ ഐ୹ ؊ Өѱ ঌҊर׮ݶ bpo-27810, ҙ۲ mailing list
  14. !43 Python 3.8ী ୶оػ positional arguments ѐ֛ METH_FASTCALL਷ ࡅܲ؀न keyword

    arguments ॶ ࣻ হ਺ 01 ӝࠄ ݫࢲ٘ ഐ୹ Python/C API Reference Manual: Common Object Structures
  15. !45 01 ӝࠄ ݫࢲ٘ ഐ୹ Review: Use FASTCALL for collections.deque

    methods: index, insert, rotate ੉۠धਵ۽ ೣࣻ੄ दӒפ୛৬ ౵य۽૒੉ ߄Պ
  16. • ೣࣻ ߸ജҗ ࢤࢿਸ ب৬઱ח بҳ • CPython ղ੢ ೣࣻ

    ੋࣻ ୊ܻܳ ذח DSL • PEP-436җ how to clinic ޙࢲ !46 Argument Clinic 01 ӝࠄ ݫࢲ٘ ഐ୹
  17. • ೣࣻ ߸ജҗ ࢤࢿਸ ب৬઱ח بҳ • CPython ղ੢ ೣࣻ

    ੋࣻ ୊ܻܳ ذח DSL • PEP-436җ how to clinic ޙࢲ !47 Argument Clinic 01 ӝࠄ ݫࢲ٘ ഐ୹
  18. !50 Various optimizations have reduced Python startup time by 10%

    on Linux and up to 30% on macOS. bpo-31333: Implement ABCMeta in C bpo-29585: site.py imports relatively large `sysconfig` module 02 ౵੉ॆ द੘ दр
  19. • abcݽٕਸ C۽ ׮द ૧׮. • site.pyо ࢎਊೞח sysconfig.py੄ ౠ੿

    ೣࣻܳ import ೞ૑ ঋҊ ࠂࢎ೧ࢲ ࢎਊೞ ب۾ ߄Ծ׮. • ؒਵ۽ isinstance৬ issubclassب 1.5ߓ ࡈۄ઎׮. !51 ੉ ѐࢶ੄ ઱ ղਊ 02 ౵੉ॆ द੘ दр
  20. • site ݽٕ਷ ੋఠ೐ܻఠܳ प೯ೡ ٸ ੗زਵ۽ import غח ݽٕ.

    site-package੄ ҃ ۽ܳ ଺Ҋ ୶оೣ • ࢎਊೞ۰ח sysconfig੄ ೣࣻܳ site.py۽ оઉ১ • ׼ো൤ աয়ח ਬ૑ࠁࣻ ਋۰. ف ݽٕ ࢎ੉੄ ঐޗ੸ੋ ҙ҅ • ׮݅ ݽٕਸ C۽ ׮द ੘ࢿೞѢա য়ېغҊ ௾ ݽٕীࢲ ೙ਃೠ ࠗ࠙݅ ܻ࠙ೞח Ѥ ց ޖ ௾ ੘স੉޲۽ ٯ ೙ਃೠ ࠗ࠙݅ оઉয়Ҋ ਬ૑ࠁࣻܳ ਤೠ ઱ࢳਸ ׮ח Ѫਵ۽ ೤੄ • ֿܻझীࢶ 5% ࡈۄ઎Ҋ macOSীࢶ 30% ࡈۄ૗   02 ౵੉ॆ द੘ दр
  21. !63 Method calls are now up to 20% faster due

    to the bytecode changes which avoid creating bound method instances. bpo-26110: Speedup method calls 1.2x 03 ੋझఢझ ݫࢲ٘ ഐ୹
  22. • positional arguments ೣࣻ ഐ୹ী ؀ೠ ࢜۽਍ opcode 2ѐ ୶о

    • LOAD_METHOD, CALL_METHOD • ӝઓ opcodeܳ ߄Լب ع૑݅ ੉ۡ҃਋ ݆਷ ࠗ࠙ীࢲ য়൤۰ ࢿמ ೞۅ !64 ੉ ѐࢶ੄ ઱ ղਊ 03 ੋझఢझ ݫࢲ٘ ഐ୹
  23. • positional arguments ೣࣻ ഐ୹ী ؀ೠ ࢜۽਍ opcode 2ѐ ୶о

    • LOAD_METHOD, CALL_METHOD • ӝઓ opcodeܳ ߄Լب ع૑݅ ੉ۡ҃਋ ݆਷ ࠗ࠙ীࢲ য়൤۰ ࢿמ ೞۅ !65 ੉ ѐࢶ੄ ઱ ղਊ 03 ੋझఢझ ݫࢲ٘ ഐ୹ ؊ ঌҊ र׮ݶ bpo-26110: Patch Set
  24. !66 TMI 03 ੋझఢझ ݫࢲ٘ ഐ୹ ӈب ߈ ۽ࢻ੉ Ӓزউ

    s.startswith('abc')੉ s[:3] == 'abc' ࠁ׮ ו۷׮ݶࢲ ই੉٣যܳ જইೣ ই૒ ੸ਊغ૓ ঋই ৈ੹൤ s[:3] == 'abc'о ؊ ࡅܰ૑݅ ա઺ী ੸ਊ оמ
  25. !69 asyncio.sleep() is now up to 2 times faster when

    the delay argument is zero or negative. bpo-32351: Use fastpath in asyncio.sleep if delay<0 04 asyncio.sleep
  26. !76 The asyncio.get_event_loop() function has been reimplemented in C to

    make it up to 15 times faster. bpo-32296: Implement asyncio._get_running_loop() and get_event_loop() in C 05 ੉߮౟ ܖ೐ оઉয়ӝ
  27. • asyncio.get_event_loop, get_running_loop ೣࣻܳ C۽ ૞ࢲ 4ߓ ࡅܰѱ ݅ٝ •

    get_running_loopܳ ژ ѐࢶ೧ࢲ 4ߓ ࡅܰѱ ݅ٝ • நय ࢎਊ • os.getpid()؀न getpid() ܳ ࢎਊೞب۾ ѐࢶೣ !77 ੉ ѐࢶ੄ ઱ ղਊ 05 ੉߮౟ ܖ೐ оઉয়ӝ
  28. • asyncio.get_event_loop, get_running_loop ೣࣻܳ C۽ ૞ࢲ 4ߓ ࡅܰѱ ݅ٝ •

    get_running_loopܳ ژ ѐࢶ೧ࢲ 4ߓ ࡅܰѱ ݅ٝ • நय ࢎਊ • os.getpid()؀न getpid() ܳ ࢎਊೞب۾ ѐࢶೣ !78 ੉ ѐࢶ੄ ઱ ղਊ ࢿמ ೱ࢚੄ 80% ਃੋ 05 ੉߮౟ ܖ೐ оઉয়ӝ
  29. • ӝઓীח ࡅܰѱ ॳҊ र׮ݶ uvloopо ୭ࢶ • ੉ ߸҃

    ࢎ೦ਵ۽ uvloop۽ب ࣘبо ࡈۄ૕ ࣻ হ঻؍ ࠗ࠙ਸ ѐࢶೣ • uvloopח event loop policyܳ ా೧ ੉߮౟ ܖ೐ ੗୓ী ؀ೠ ࠗ࠙ਸ ѐࢶೞӝ ٸޙ • അ੤ ੉߮౟ ܖ೐ܳ оઉয়Ҋ ߈ജೞחѤ API۽ ઁҕೞ૑ ঋওӝী Ѥܾ٘ ࣻ হ਺   05 ੉߮౟ ܖ೐ оઉয়ӝ
  30. • ੋ੗۽ ٜযৡ ௏ܖ౯ ೞաೞա݃׮ functools.partial ೞ؍ ࠗ࠙ਸ ઁѢ •

    ensure_future৬ ઺ࠂغח ۽૒ ઁѢ !94 ੉ ѐࢶ੄ ઱ ղਊ 06 زदী प೯ೞӝ
  31. !97 06 زदী प೯ೞӝ #4913 PR ӝઓূ ೞա ՘զ ٸ݃׮

    Ѿҗܳ ੷੢೮׮ݶ ѐࢶ റূ ׮ ՘աݶ Ӓٸࢲঠ Ѿҗܳ ੷੢
  32. • ensure_futureח ੋ੗о futureо ইפݶ future۽ ߸ജ • future.isfuture()۽ futureੋ૑

    ݢ੷ ѨࢎೞҊ coroutines.iscoroutine()۽ ௏ ܖ౯ੋ૑ Ѩࢎೣ • Ӓؘ۠ पઁ۽ ࢎਊೞחѦ ࠁݶ ؀ࠗ࠙ run_until_complete()ی async ೣࣻо ֈয ৡ gather() ীࢲ ࢎਊؽ • Ӓ۞޲۽ ௏ܖ౯ਸ ݢ੷ Ѩࢎೞب۾ ifޙ ࣽࢲܳ ߄Է !100 ੉ ѐࢶ੄ ઱ ղਊ 07 asyncio.ensure_future
  33. • ensure_futureח ੋ੗о futureо ইפݶ future۽ ߸ജ • future.isfuture()۽ futureੋ૑

    ݢ੷ ѨࢎೞҊ coroutines.iscoroutine()۽ ௏ ܖ౯ੋ૑ Ѩࢎೣ • Ӓؘ۠ पઁ۽ ࢎਊೞחѦ ࠁݶ ؀ࠗ࠙ run_until_complete()ی async ೣࣻо ֈয ৡ gather() ীࢲ ࢎਊؽ • Ӓ۞޲۽ ௏ܖ౯ਸ ݢ੷ Ѩࢎೞب۾ ifޙ ࣽࢲܳ ߄Է !101 ੉ ѐࢶ੄ ઱ ղਊ 07 asyncio.ensure_future tmi: async def۽ ࢶ঱ೠ ೣࣻח ௏ܖ౯ਸ ࢤࢿ ೞח ೣࣻо ؽ
  34. !104 As a result of PEP 560 work, the import

    time of typing has been reduced by a factor of 7, and many typing operations are now faster. bpo-32226: Implement PEP 560: Core support for typing module and generic types 08 typing ݽٕ оઉয়ӝ
  35. • ઁ֎ܼ ഋधਸ ؊ ੜ ૑ਗೞӝ ਤ೧ ౠࣻ ݫࢲ٘ܳ ୶о

    • __class_getitem__, __mro_entries__ !105 ੉ ѐࢶ੄ ઱ ղਊ 08 typing ݽٕ оઉয়ӝ
  36. • ఋੑ ൦౴ਸ ઁউೠ PEP-484਷ ੋఠ೐ܻఠ ۨ߰੄ ߸҃਷ হب۾ ٣੗ੋؽ

    • Ӓېࢲ Generic[T], Iterable[int], List[str] ١ਸ ҳഅೞӝ ਤ೧ࢶ ৈ۞о૑ ౟ܼ ਸ ࢎਊೡ ࣻ ߆ী হ঻਺. __getitem__਷ ੋझఢझীࢲ݅ ز੘ೞҊ ௿ېझীࢶ ز੘ೞ ૑ ঋ਺ • Ӓؘ۠ ੉ઃ ఋ੉ೝ, ఋੑ ൦౟о օܻ ࢎਊغפ ੉ ઁೠਸ ಽয ઁ֎ܼ ഋध ૑ਗਸ ਤೠ ౠࣻ ݫࢲ٘ܳ ୶оೣ. ੉ѱ PEP-560੄ ղਊ !106 ੉ ѐࢶ੄ ઱ ղਊ 08 typing ݽٕ оઉয়ӝ
  37. • ఋੑ ൦౴ਸ ઁউೠ PEP-484਷ ੋఠ೐ܻఠ ۨ߰੄ ߸҃਷ হب۾ ٣੗ੋؽ

    • Ӓېࢲ Generic[T], Iterable[int], List[str] ١ਸ ҳഅೞӝ ਤ೧ࢶ ৈ۞о૑ ౟ܼ ਸ ࢎਊೡ ࣻ ߆ী হ঻਺. __getitem__਷ ੋझఢझীࢲ݅ ز੘ೞҊ ௿ېझীࢶ ز੘ೞ ૑ ঋ਺ • Ӓؘ۠ ੉ઃ ఋ੉ೝ, ఋੑ ൦౟о օܻ ࢎਊغפ ੉ ઁೠਸ ಽয ઁ֎ܼ ഋध ૑ਗਸ ਤೠ ౠࣻ ݫࢲ٘ܳ ୶оೣ. ੉ѱ PEP-560੄ ղਊ !107 ੉ ѐࢶ੄ ઱ ղਊ 08 typing ݽٕ оઉয়ӝ
  38. • ఋੑ ൦౴ਸ ઁউೠ PEP-484਷ ੋఠ೐ܻఠ ۨ߰੄ ߸҃਷ হب۾ ٣੗ੋؽ

    • Ӓېࢲ Generic[T], Iterable[int], List[str] ١ਸ ҳഅೞӝ ਤ೧ࢶ ৈ۞о૑ ౟ܼ ਸ ࢎਊೡ ࣻ ߆ী হ঻਺. __getitem__਷ ੋझఢझীࢲ݅ ز੘ೞҊ ௿ېझীࢶ ز੘ೞ ૑ ঋ਺ • Ӓؘ۠ ੉ઃ ఋ੉ೝ, ఋੑ ൦౟о օܻ ࢎਊغפ ੉ ઁೠਸ ಽয ઁ֎ܼ ഋध ૑ਗਸ ਤೠ ౠࣻ ݫࢲ٘ܳ ୶оೣ. ੉ѱ PEP-560੄ ղਊ !108 ੉ ѐࢶ੄ ઱ ղਊ 08 typing ݽٕ оઉয়ӝ
  39. • ࢜܂ѱ ୶оػ __class_getitem__੉ যڌѱ ࢿמਸ ѐࢶदௌח૑ח #4906 PRী 2,400઴੄

    diff۽ ੗ࣁ൤ ա৬੓਺. • Ӓزউ typing ݽٕ੉ importо ו۷חؘ Ѣ੄ ઁ֎ܼఋੑ ٸޙ੉঻਺ • ੉ ߸҃ਵ۽ ݽٕ importח 7ߓ, ઁ֎ܼ ௿ېझ ࢤࢿ਷ 4ߓ ࡈۄ૗ • ਬੌೠ ࠳ۨ੉ఊ ୓ੋ૑ח ೧׼ ؍؊ݫࣗ٘ܳ ੐੄۽ ҳഅ೧ ׮ܲ ਊب۽ ॳҊ੓؍ ௏٘ • ೞ૑݅ ੉޷ ؍؊ݫࣗ٘ח ҃Ҋহ੉ ӵ૕ࣻ੓׮Ҋ ੸যְӝী ޙઁ হ਺ !109 ੉ ѐࢶ੄ ઱ ղਊ 08 typing ݽٕ оઉয়ӝ
  40. • ࢜܂ѱ ୶оػ __class_getitem__੉ যڌѱ ࢿמਸ ѐࢶदௌח૑ח #4906 PRী 2,400઴੄

    diff۽ ੗ࣁ൤ ա৬੓਺. • Ӓزউ typing ݽٕ੉ importо ו۷חؘ Ѣ੄ ઁ֎ܼఋੑ ٸޙ੉঻਺ • ੉ ߸҃ਵ۽ ݽٕ importח 7ߓ, ઁ֎ܼ ௿ېझ ࢤࢿ਷ 4ߓ ࡈۄ૗ • ਬੌೠ ࠳ۨ੉ఊ ୓ੋ૑ח ೧׼ ؍؊ݫࣗ٘ܳ ੐੄۽ ҳഅ೧ ׮ܲ ਊب۽ ॳҊ੓؍ ௏٘ • ೞ૑݅ ੉޷ ؍؊ݫࣗ٘ח ҃Ҋহ੉ ӵ૕ࣻ੓׮Ҋ ੸যְӝী ޙઁ হ਺ !110 ੉ ѐࢶ੄ ઱ ղਊ 08 typing ݽٕ оઉয়ӝ
  41. • ࢜܂ѱ ୶оػ __class_getitem__੉ যڌѱ ࢿמਸ ѐࢶदௌח૑ח #4906 PRী 2,400઴੄

    diff۽ ੗ࣁ൤ ա৬੓਺. • Ӓزউ typing ݽٕ੉ importо ו۷חؘ Ѣ੄ ઁ֎ܼఋੑ ٸޙ੉঻਺ • ੉ ߸҃ਵ۽ ݽٕ importח 7ߓ, ઁ֎ܼ ௿ېझ ࢤࢿ਷ 4ߓ ࡈۄ૗ • ਬੌೠ ࠳ۨ੉ఊ ୓ੋ૑ח ೧׼ ؍؊ݫࣗ٘ܳ ੐੄۽ ҳഅ೧ ׮ܲ ਊب۽ ॳҊ੓؍ ௏٘ • ೞ૑݅ ੉޷ ؍؊ݫࣗ٘ח ҃Ҋহ੉ ӵ૕ࣻ੓׮Ҋ ੸যְӝী ޙઁ হ਺ !111 ੉ ѐࢶ੄ ઱ ղਊ 08 typing ݽٕ оઉয়ӝ
  42. • ࢜܂ѱ ୶оػ __class_getitem__੉ যڌѱ ࢿמਸ ѐࢶदௌח૑ח #4906 PRী 2,400઴੄

    diff۽ ੗ࣁ൤ ա৬੓਺. • Ӓزউ typing ݽٕ੉ importо ו۷חؘ Ѣ੄ ઁ֎ܼఋੑ ٸޙ੉঻਺ • ੉ ߸҃ਵ۽ ݽٕ importח 7ߓ, ઁ֎ܼ ௿ېझ ࢤࢿ਷ 4ߓ ࡈۄ૗ • ਬੌೠ ࠳ۨ੉ఊ ୓ੋ૑ח ೧׼ ؍؊ݫࣗ٘ܳ ੐੄۽ ҳഅ೧ ׮ܲ ਊب۽ ॳҊ੓؍ ௏٘ • ೞ૑݅ ੉޷ ؍؊ݫࣗ٘ח ҃Ҋহ੉ ӵ૕ࣻ੓׮Ҋ ੸যְӝী ޙઁ হ਺ !112 ੉ ѐࢶ੄ ઱ ղਊ 08 typing ݽٕ оઉয়ӝ
  43. !114 sorted() and list.sort() have been optimized for common cases

    to be up to 40-75% faster. bpo-28685: Optimizing list.sort() by performing safety checks in advance 09 ܻझ౟ ੿۳
  44. • ੿۳ ঌҊ્ܻਸ ߸҃ೠ Ѫ੉ ইש • ܻझ౟ܳ ੿۳ೡ ٸ

    ؀ࠗ࠙੄ ҃਋ чٜ੉ ࢲ۽ زੌೠ ఋੑ੉ۄҊ о੿ • ݒߣ чਸ ࠺Үೡ ٸ݃׮ ఋੑ Ѩࢎೞ૑ ݈Ҋ ޷ܻ ೠ ߣ݅ ೧ف੗! о ই੉٣য !115 ੉ ѐࢶ੄ ઱ ղਊ 09 ܻझ౟ ੿۳
  45. • ੿۳ ঌҊ્ܻਸ ߸҃ೠ Ѫ੉ ইש • ܻझ౟ܳ ੿۳ೡ ٸ

    ؀ࠗ࠙੄ ҃਋ чٜ੉ ࢲ۽ زੌೠ ఋੑ੉ۄҊ о੿ • ݒߣ чਸ ࠺Үೡ ٸ݃׮ ఋੑ Ѩࢎೞ૑ ݈Ҋ ޷ܻ ೠ ߣ݅ ೧ف੗! о ই੉٣য !116 ੉ ѐࢶ੄ ઱ ղਊ 09 ܻझ౟ ੿۳
  46. • ৈ۞о૑ о੿ਸ ࣁ਋Ҋ pre-check stageܳ ݅ٝ • safe_object_compare: ৈ۞

    ఋੑ੉ ੓׮Ҋ о੿, ӝઓী ࢎਊೞ؍ উ੹ೠ ߑध • unsafe_object_compare: ೠ ఋੑ੉ۄҊ о੿ • unsafe_latin_compare: Latin ޙ੗ৌ੉ۄҊ о੿ • Ӓ ৻ int, float, tuple۽ ੉ܖয૓ ܻझ౟ۄҊ о੿ • о੿ਸ ѨૐೞҊ ੸ਊ೧ ࠺ਊ੉ ࠺ऴ উ੿ࢿ Ѩࢎܳ ਋ഥೞח ୭੸ച ࠺Ү ೣࣻ ࢎਊ !117 ੉ ѐࢶ੄ ઱ ղਊ 09 ܻझ౟ ੿۳
  47. !119 09 ܻझ౟ ੿۳ #582 PR п о੿ٜਸ Ѩૐೞח C

    ௏٘৬ ୭੸ചػ ࠺Ү ೣࣻח যڌѱ ࢤ҂ח૑ח ࢤۚ
  48. !120 ই઱ ୭ঈ੄ ҃਋ ਤ੄ о੿ٜ੉ ݽف ౣܻѱ غҊ ӝࠄز੘ੋ

    safe_object_compare۽ ֈযоӝө૑ pre-check ٸޙী 15%੿ب ו۰૗ 09 ܻझ౟ ੿۳
  49. !122 dict.copy() is now up to 5.5 times faster. bpo-31179:

    Speed-up dict.copy() up to 5.5 times. 10 ٤࣊ցܻ ࠂࢎ
  50. • ਗېח ࠼ dictܳ ٜ݅Ҋ key, valueܳ ೞաঀ ୶о •

    ӝઓ dict ੹୓ key, value ৔৉੄ ݫݽܻܳ ా૩۽ ࠂࢎ(memcpy)ೞҊ ۨಌ۠झ ஠਍౟ ܳ ט۰઱੗(increfs)! о ই੉٣য • ܻ࠭যо ੗઱ ࢎਊೞ૑ ঋח ӝמٸޙী 50઴੄ C ௏٘ܳ ୶оೠ׮Ҋ ਬ૑ࠁࣻ ஏݶী ࢲ ৏۰ೣ • ೞ૑݅ ੷੗о 50݅ ઴ ੉࢚੄ ೐۽ં౟ա ORMীࢲ dict.copyח ഝߊ൤ ࢎਊೠ׮ ঱ әೞݴ 5.5ߓ ࡅܰѱೞחѤ ୽࠙൤ ੄޷੓׮Ҋ ࢸٙ. tmi: ੷੗ח asyncpg੄ ݫੋప੉ց !123 ੉ ѐࢶ੄ ઱ ղਊ 10 ٤࣊ցܻ ࠂࢎ
  51. • ਗېח ࠼ dictܳ ٜ݅Ҋ key, valueܳ ೞաঀ ୶о •

    ӝઓ dict ੹୓ key, value ৔৉੄ ݫݽܻܳ ా૩۽ ࠂࢎ(memcpy)ೞҊ ۨಌ۠झ ஠਍౟ ܳ ט۰઱੗(increfs)! о ই੉٣য • ܻ࠭যо ੗઱ ࢎਊೞ૑ ঋח ӝמٸޙী 50઴੄ C ௏٘ܳ ୶оೠ׮Ҋ ਬ૑ࠁࣻ ஏݶী ࢲ ৏۰ೣ • ೞ૑݅ ੷੗о 50݅ ઴ ੉࢚੄ ೐۽ં౟ա ORMীࢲ dict.copyח ഝߊ൤ ࢎਊೠ׮ ঱ әೞݴ 5.5ߓ ࡅܰѱೞחѤ ୽࠙൤ ੄޷੓׮Ҋ ࢸٙ. tmi: ੷੗ח asyncpg੄ ݫੋప੉ց !124 ੉ ѐࢶ੄ ઱ ղਊ 10 ٤࣊ցܻ ࠂࢎ
  52. !126 Optimized case-insensitive matching and searching of regular expressions. Searching

    some patterns can now be up to 20 times faster. bpo-30285: Optimize case-insensitive regular expressions 11 ੿ӏ಴അध
  53. • ӝઓ੄ case-insensitive ݽ٘(re.IGNORECASE)ח ݽٚ ޙ੗ܳ lower case۽ ٜ݅Ҋ ݻо૑

    ୭੸ചܳ ࠺ഝࢿചೣ • ೞ૑݅ য়۽૑ 2669ѐ੄ Ӗ੗݅੉ lower/upper case ҳ࠙੉ ੓਺ • ब૑য ইझః ݽ٘(re.ASCII)ীࢶ ױ 52Ӗ੗ • ೧׼ Ӗ੗ٜ݅ ٮ۽ ୊ܻೞҊ աݠ૑ ݽٚ Ӗ੗ী ؀೧ࢶ case-sensitive ݽ٘੄ ୭੸ച ب ੸ਊ೧ ࡅܲ ࣘب۽ ୊ܻೞѱՔ ѐࢶ !127 ੉ ѐࢶ੄ ઱ ղਊ 11 ੿ӏ಴അध
  54. Python 3.6 vs 3.7 ӝࠄ ݫࢲ٘ ഐ୹ ౵੉ॆ द੘ दр

    ੋझఢझ ݫࢲ٘ ഐ୹ asyncio.sleep ੉߮౟ ܖ೐ оઉয়ӝ زदী प೯ೞӝ asyncio.ensure_future typing ݽٕ оઉয়ӝ ܻझ౟ ੿۳ ٤࣊ցܻ ࠂࢎ ੿ӏ಴അध ՘ਵ۽
  55. Python 3.6 vs 3.7 ӝࠄ ݫࢲ٘ ഐ୹ ౵੉ॆ द੘ दр

    ੋझఢझ ݫࢲ٘ ഐ୹ asyncio.sleep ੉߮౟ ܖ೐ оઉয়ӝ زदী प೯ೞӝ asyncio.ensure_future typing ݽٕ оઉয়ӝ ܻझ౟ ੿۳ ٤࣊ցܻ ࠂࢎ ੿ӏ಴അध ՘ਵ۽
  56. • ౵੉ॆ 3.7 ୶ୌ೤פ׮, ౠ൤ ࠺زӝܳ ॵ׮ݶ ؊਌ • ౵੉ॆ਷

    ו݀פ׮, ೞ૑݅ न҃ॳ૑ ঋणפ׮ • ಌನݢझী ӝৈ೧઱न ஶ౟ܻ࠭ఠٜ࠙ хࢎ೤פ׮ !134 ೞҊर਷ ݈ Victor Stinner Inada Naoki Ivan Levkivskyi Yury Selivanov Sethiy Storchaka else: ՘ਵ۽