‹ BackHN Continuity

Thread

Writing Efficient C++ Code (2013)

176 points · 161 comments · ibobev

  1. uwagar · · focus · HN ↗
    i heard a lot of AI and LLM is in python?
    1. [deleted] · · focus · HN ↗

      [deleted]

    2. tom_ · · focus · HN ↗
      You heard correctly. This discussion is about C++ though.
    3. hydrocephalitic · · focus · HN ↗
      Yes, but the numerical backend of the python libraries are written in lower-level languages. For example, pytorch uses a C++ backend.
    4. bee_rider · · focus · HN ↗
      Python is often used as (very useful!) glue for calling CUDA, C, C++, Fortran, etc… codes.

      So, if you are thinking about the sort of “business logic” that’s often Python, but the performance comes from the parts that are usually not.

      1. uwagar · · focus · HN ↗
        well you'd be surprised how much of that glue becomes logic and eats up the ground water.
    5. cosmicradiance · · focus · HN ↗
      Bumblebees shouldn’t be able to fly; they do anyways.
    6. pjmlp · · focus · HN ↗
      As glue language for the actual work implemented in a mix of C, C++, Fortran and more recently Rust.

      Just that Python culture has a strange way to call bindings to native code, "Python libraries".

Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.