Skip to content
Tiatra, LLCTiatra, LLC
Tiatra, LLC
Information Technology Solutions for Washington, DC Government Agencies
  • Home
  • About Us
  • Services
    • IT Engineering and Support
    • Software Development
    • Information Assurance and Testing
    • Project and Program Management
  • Clients & Partners
  • Careers
  • News
  • Contact
 
  • Home
  • About Us
  • Services
    • IT Engineering and Support
    • Software Development
    • Information Assurance and Testing
    • Project and Program Management
  • Clients & Partners
  • Careers
  • News
  • Contact

C언어와 속도 격차 좁힌다··· 파이썬 새 버전, 인터프리터 개선해 30% 성능↑

파이썬 재단의 공식 문서에 따르면, 파이썬 3.14 버전에는 ‘꼬리 호출(tail calls) 기반의 새로운 인터프리터’가 탑재된다. 사실 이 문구는 파이썬 개발 과정을 잘 모르는 사람들에게는 다소 오해를 불러일으킬 수 있는 표현이다. 여기서 말하는 ‘꼬리 호출’은 CPython 또는 파이썬 언어 자체가 꼬리 호출 최적화를 지원한다는 의미가 아니다. 그보다는 C 컴파일러가 CPython 코드에서 수행하는 최적화 기법으로, 인터프리터가 바이트코드를 실행하는 과정을 최적화해 전체 실행 속도를 높인다.

기존 파이썬 코드나 CPython용 C 확장 모듈은 변경이나 재컴파일이 필요 없다. CPython API나 ABI에 변화가 없기 때문이다. 또한 새로운 인터프리터는 기존 코드를 주로 재활용해 구현되어 CPython의 유지보수 부담도 크게 늘리지 않는다.

사전 빌드된 CPython 바이너리 사용자는 파이썬 3.14로 업그레이드하면서 새로운 인터프리터를 자동으로 받게 된다. 하지만 소스에서 CPython을 빌드하는 경우에는 이 기능을 사용하기 위해 특정 컴파일 플래그(–with-tail-call-interp)가 필요하다.

주목할 만한 점은 이 새로운 인터프리터를 사용하려면 꼬리 호출 최적화를 지원하는 C 컴파일러가 필요하다는 것이다. 모든 C 컴파일러가 꼬리 호출 최적화를 지원하는 것은 아니지만, 현재 MSVC와 Clang 19 이상(x86-64 및 AArch64 아키텍처)에서 컴파일이 가능하다. 향후 GCC에서도 지원될 것으로 예상된다.

파이썬은 러스트나 C/C++ 같은 기계어 수준으로 컴파일되는 언어보다 속도가 느린 편이다. 파이썬의 동작 방식 때문에 속도 최적화가 어렵기 때문이다. 그러나 이러한 한계를 극복하기 위한 최적화 작업은 꾸준히 진행되어 왔다. 대부분의 최적화는 CPython 인터프리터가 불필요한 작업을 줄이는 방식으로 이루어지고 있다. 예를 들어, 특수한 옵코드(opcode)를 사용하거나 JIT(Just-In-Time) 컴파일과 같은 기법이 적용된다.

그동안의 최적화 노력들은 대부분 제한적인 성능 향상만을 가져왔다. 그러나 많은 개선이 누적되어 효과를 내며, 꼬리 호출 최적화와 같은 일부 최적화는 전반적으로 큰 성능 향상을 가져올 수 있다.

CPython 최적화의 공통된 목표는 사용자에게 별다른 부담을 주지 않으면서 성능을 높이는 것이다. 파이썬의 광범위한 사용자층과 방대한 라이브러리 생태계를 고려할 때, 기존 코드와의 호환성을 유지하면서 성능을 개선하는 것이 가장 효과적인 접근 방식이다.

새로운 인터프리터를 테스트할 수 있는 파이썬 3.14의 첫 번째 베타 버전은 2025년 5월 출시될 예정이다. 중간 알파 버전에도 새로운 인터프리터가 포함될 예정이다.
[email protected]


Read More from This Article: C언어와 속도 격차 좁힌다··· 파이썬 새 버전, 인터프리터 개선해 30% 성능↑
Source: News

Category: NewsFebruary 14, 2025
Tags: art

Post navigation

PreviousPrevious post:윈도우10과 함께 지원 종료되는 익스체인지 2016·2019··· 보안팀이 알아야 할 사항은?NextNext post:CISPE, 유럽 내 브로드컴·MS 라이선스 조사 결과 발표··· “문제 바로잡아야”

Related posts

CDO and CAIO roles might have a built-in expiration date
May 9, 2025
What CIOs can do to convert AI hype into tangible business outcomes
May 9, 2025
IT Procurement Trends Every CIO Should Watch in 2025
May 9, 2025
‘서둘러 짠 코드가 빚으로 돌아올 때’··· 기술 부채 해결 팁 6가지
May 9, 2025
2025 CIO 현황 보고서 발표··· “CIO, 전략적 AI 조율가로 부상”
May 9, 2025
독일 IT 사용자 협회, EU 집행위에 브로드컴 민원 제기··· “심각한 경쟁 위반”
May 9, 2025
Recent Posts
  • CDO and CAIO roles might have a built-in expiration date
  • What CIOs can do to convert AI hype into tangible business outcomes
  • IT Procurement Trends Every CIO Should Watch in 2025
  • ‘서둘러 짠 코드가 빚으로 돌아올 때’··· 기술 부채 해결 팁 6가지
  • 2025 CIO 현황 보고서 발표··· “CIO, 전략적 AI 조율가로 부상”
Recent Comments
    Archives
    • May 2025
    • April 2025
    • March 2025
    • February 2025
    • January 2025
    • December 2024
    • November 2024
    • October 2024
    • September 2024
    • August 2024
    • July 2024
    • June 2024
    • May 2024
    • April 2024
    • March 2024
    • February 2024
    • January 2024
    • December 2023
    • November 2023
    • October 2023
    • September 2023
    • August 2023
    • July 2023
    • June 2023
    • May 2023
    • April 2023
    • March 2023
    • February 2023
    • January 2023
    • December 2022
    • November 2022
    • October 2022
    • September 2022
    • August 2022
    • July 2022
    • June 2022
    • May 2022
    • April 2022
    • March 2022
    • February 2022
    • January 2022
    • December 2021
    • November 2021
    • October 2021
    • September 2021
    • August 2021
    • July 2021
    • June 2021
    • May 2021
    • April 2021
    • March 2021
    • February 2021
    • January 2021
    • December 2020
    • November 2020
    • October 2020
    • September 2020
    • August 2020
    • July 2020
    • June 2020
    • May 2020
    • April 2020
    • January 2020
    • December 2019
    • November 2019
    • October 2019
    • September 2019
    • August 2019
    • July 2019
    • June 2019
    • May 2019
    • April 2019
    • March 2019
    • February 2019
    • January 2019
    • December 2018
    • November 2018
    • October 2018
    • September 2018
    • August 2018
    • July 2018
    • June 2018
    • May 2018
    • April 2018
    • March 2018
    • February 2018
    • January 2018
    • December 2017
    • November 2017
    • October 2017
    • September 2017
    • August 2017
    • July 2017
    • June 2017
    • May 2017
    • April 2017
    • March 2017
    • February 2017
    • January 2017
    Categories
    • News
    Meta
    • Log in
    • Entries feed
    • Comments feed
    • WordPress.org
    Tiatra LLC.

    Tiatra, LLC, based in the Washington, DC metropolitan area, proudly serves federal government agencies, organizations that work with the government and other commercial businesses and organizations. Tiatra specializes in a broad range of information technology (IT) development and management services incorporating solid engineering, attention to client needs, and meeting or exceeding any security parameters required. Our small yet innovative company is structured with a full complement of the necessary technical experts, working with hands-on management, to provide a high level of service and competitive pricing for your systems and engineering requirements.

    Find us on:

    FacebookTwitterLinkedin

    Submitclear

    Tiatra, LLC
    Copyright 2016. All rights reserved.