How Many Lines of C It Takes to Execute a and B in Python?

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

CodeRabbit: AI Code Reviews for Developers
Revolutionize your code reviews with AI. CodeRabbit offers PR summaries, code walkthroughs, 1-click suggestions, and AST-based analysis. Boost productivity and code quality across all major languages with each PR.
coderabbit.ai
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  • CPython

    The Python programming language

    Your "just in case the software is exposed to the web" should be "exposed to untrusted data." The very old Python hash could be DoS'ed reading a data file. The original randomized version required some feedback to figure out the hash, so generally required some sort of interaction.

    I find that hard to believe that's a performance bottleneck. String hashes are all cached, and names like "print" are interned.

    For a 2x overall gain I would expect to see the hash function pop up easily in my profiling, but I haven't seen it in my own profiling which was looking for simple things like that.

    When siphash was evaluated, quoting https://peps.python.org/pep-0456/#performance , "In general the PEP 456 code with SipHash24 is about as fast as the old code with FNV" and "The summarized total runtime of the benchmark is within 1% of the runtime of an unmodified Python 3.4 binary".

    Since then they switched from siphash24 to the faster siphash13. https://github.com/python/cpython/pull/28752

  • CodeRabbit

    CodeRabbit: AI Code Reviews for Developers. Revolutionize your code reviews with AI. CodeRabbit offers PR summaries, code walkthroughs, 1-click suggestions, and AST-based analysis. Boost productivity and code quality across all major languages with each PR.

    CodeRabbit logo
  • rustc-hash

    Custom hash algorithm used by rustc (plus hashmap/set aliases): fast, deterministic, not secure

    Which is why the Rust compiler itself uses a non-cryptographic hash, which takes just 3 x86 instructions and can work on 8 bytes at a time: <https://github.com/rust-lang/rustc-hash/blob/master/src/lib....>

  • toast

    Time Ordered Astrophysics Scalable Tools (by hpc4cmb)

    I have a real life example in this commit: https://github.com/hpc4cmb/toast/pull/380/commits/a38d1d6dbc...

    Replacing 2 lines of python code (with tens of glue code in Numba) with hundreds lines of C++ with glue code.

  • uBlock

    uBlock Origin - An efficient blocker for Chromium and Firefox. Fast and lean.

    If you have no knowledge you can still make use of element picker in the context menu. In this case though the problematic element will have a generated class name like `frontend-components-SubscribePrompt-`, so I resorted to the CSS syntax (`##`). There are a lot, a freaking lot of them [1] but the CSS syntax alone can achieve a lot.

    [1] https://github.com/gorhill/uBlock/wiki/Static-filter-syntax

  • ideas

    Recent CPython development has been towards optimizations and addressing use cases that benefit from optimizations, some coming from the faster CPython initiative. You might just get your JIT[1].

    [1] https://github.com/faster-cpython/ideas/wiki/Workflow-for-3....

  • kill-sticky

    Bookmarklet to remove sticky elements and restore scrolling to web pages!

  • noscript

    The popular NoScript Security Suite browser extension.

  • SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
  • duckduckgo-locales

    Translation files for <a href="https://duckduckgo.com"> </a>

  • cpython

    Python, but with pluggable malloc (by JacksonKearl)

    A template repo can be found here https://github.com/JacksonKearl/cpython, but it does not implement an ideal malloc as I am not sure if it is still being used as an assignment.

    The repo states that even this dummy implementation:

    > has a 60% faster startup as compared to base CPython, and in some test cases has marginally better runtime performance as well.

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

  • Watch out for mining malware in afterburner!

    4 projects | /r/pcmasterrace | 5 Dec 2022
  • Android 13 requires devices to have more than 2GB RAM and 16GB storage

    5 projects | news.ycombinator.com | 9 Sep 2022
  • Can I stop a specific website from showing up in search results?

    2 projects | /r/privacy | 24 Feb 2022
  • Firefox vs Brave - I tested them so you don't need to.

    5 projects | /r/PrivacyGuides | 13 Jan 2022
  • LPT Google doesn't show ads when your query includes anything related to covid but it doesn't distinguish which part of the query. So if you use 'covid' as an excluded phrase (e.g. nvidia 3080 -covid), you get similar results but without ads.

    2 projects | /r/LifeProTips | 1 Jul 2021

Did you konow that JavaScript is
the 3rd most popular programming language
based on number of metions?