Recent Performance Improvements in Function Calls in CPython

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

InfluxDB - Purpose built for real-time analytics at any scale.
InfluxDB Platform is powered by columnar analytics, optimized for cost-efficient storage, and built with open data standards.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  • Lua

    Lua is a powerful, efficient, lightweight, embeddable scripting language. It supports procedural programming, object-oriented programming, functional programming, data-driven programming, and data description.

    One of the performance improvements mentioned is "Remove the usage of the C stack in Python to Python calls" [0]. Since Python 3.11, a Python-level function call can be evaluated within the bytecode interpreter loop, no longer requiring a C-level function call.

    Interestingly, Lua did the opposite. Its implementation introduced C-level function calls for performance reasons [1] (although this change was reverted in 5.4.2 [2]).

    [0] https://bugs.python.org/issue45256

    [1] https://github.com/lua/lua/commit/196c87c9cecfacf978f37de4ec...

    [1] https://github.com/lua/lua/commit/5d8ce05b3f6fad79e37ed21c10...

  • InfluxDB

    Purpose built for real-time analytics at any scale. InfluxDB Platform is powered by columnar analytics, optimized for cost-efficient storage, and built with open data standards.

    InfluxDB logo
  • Nim

    Nim is a statically typed compiled systems programming language. It combines successful concepts from mature languages like Python, Ada and Modula. Its design focuses on efficiency, expressiveness, and elegance (in that order of priority).

    Take a look at Nim.

    You get C performance, with the readability of Python.

    https://nim-lang.org/

  • toast

    Time Ordered Astrophysics Scalable Tools (by hpc4cmb)

    I have an example to support: https://github.com/hpc4cmb/toast/pull/380/commits/a38d1d6dbc...

    A one-liner in Python is replaced by hundreds of lines of changes to implement in C++. (The one-liner has some boilerplates around it too, but the C++ function itself is longer and the boilerplates around is even more.)

  • transit-python3

    Fork of transit-python2

    few months ago i had to optimize some old python code, .. and found that my longtime assumptions from py 1,2 and early 3.x are not anymore true. So put up some comparisons.. Check them here:

    https://github.com/svilendobrev/transit-python3/blob/master/...

    (comment out the import transit.* and the two checks after it as they are specific. Takes ~25 seconds to finish)

    Results like below. Most make sense, after thinking deeper about it, but some are weird.

    One thing stays axiomatic though: no way of doing something is faster than not doing it at all.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • What programming language should a non-programmer learn to have a stimulating, challenging, and fun experience? Forth? Haskell? Assembly?

    2 projects | /r/learnprogramming | 27 Jun 2023
  • Very simple rust program recognized as virus by antivirus

    2 projects | /r/rust | 12 May 2023
  • Hey I made a new programming language called Yaksha

    3 projects | /r/ProgrammingLanguages | 19 Mar 2023
  • Nim version 2.0.0 release candidate

    7 projects | news.ycombinator.com | 21 Dec 2022
  • A Python-compatible statically typed language

    4 projects | /r/programming | 12 Aug 2022