lemmy.sieprawski.pl
  • Communities
  • Create Post
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
abhi9u@lemmy.world to Technology@lemmy.worldEnglish · 11 months ago

Are Function Calls Still Slow in Python? An Analysis of Recent Optimizations in CPython

blog.codingconfessions.com

external-link
message-square
11
fedilink
100
external-link

Are Function Calls Still Slow in Python? An Analysis of Recent Optimizations in CPython

blog.codingconfessions.com

abhi9u@lemmy.world to Technology@lemmy.worldEnglish · 11 months ago
message-square
11
fedilink
How costly it is to call functions and builtins in your python code? Does inlining help? How have the recent CPython releases improved performance in these areas?
alert-triangle
You must log in or register to comment.
  • tgm@lemmy.world
    cake
    link
    fedilink
    English
    arrow-up
    5
    arrow-down
    1
    ·
    11 months ago

    I thought function calls was one of the decently optimized things in Python

  • _sideffect@lemmy.world
    link
    fedilink
    English
    arrow-up
    16
    arrow-down
    41
    ·
    11 months ago

    Just code in C

    • spacecadet@lemm.ee
      link
      fedilink
      English
      arrow-up
      34
      arrow-down
      1
      ·
      11 months ago

      Just code in assembly

      • jj4211@lemmy.world
        link
        fedilink
        English
        arrow-up
        20
        arrow-down
        1
        ·
        11 months ago

        Just punch the cards

        • sugar_in_your_tea@sh.itjust.works
          link
          fedilink
          English
          arrow-up
          2
          arrow-down
          1
          ·
          11 months ago

          Just wire up your own gates. It’s not that hard.

      • GBU_28@lemm.ee
        link
        fedilink
        English
        arrow-up
        8
        arrow-down
        1
        ·
        11 months ago

        Just ritualistically wave a magnet near the computer

      • TunaCowboy@lemmy.world
        link
        fedilink
        English
        arrow-up
        4
        arrow-down
        1
        ·
        edit-2
        7 months ago

        deleted by creator

      • ilega_dh@feddit.nl
        link
        fedilink
        English
        arrow-up
        3
        arrow-down
        1
        ·
        11 months ago

        Don’t write code, why do you need a computer to do your math? Just do it on paper ffs.

        • Deceptichum@quokk.au
          link
          fedilink
          English
          arrow-up
          2
          ·
          edit-2
          11 months ago

          Paper‽ What too good for a clay tablet?

    • TunaCowboy@lemmy.world
      link
      fedilink
      English
      arrow-up
      14
      arrow-down
      7
      ·
      edit-2
      7 months ago

      deleted by creator

      • celliern@lemmy.world
        link
        fedilink
        English
        arrow-up
        12
        arrow-down
        1
        ·
        11 months ago

        There is a difference being able to drop down in C and using exclusively C.

        One of the main advantage of python is being to quickly write code, and using C-based library / part of code written in C (or fortran, or rust for what it matters) when needed.

        “just write C” may lack a bit of nuance.

      • _sideffect@lemmy.world
        link
        fedilink
        English
        arrow-up
        4
        arrow-down
        11
        ·
        11 months ago

        Exactly.

        I don’t really care, people will downvote for any number of reasons, and I know I was right, so it doesn’t bug me

    • Plopp@lemmy.world
      link
      fedilink
      English
      arrow-up
      7
      arrow-down
      5
      ·
      11 months ago

      How about no.

Technology@lemmy.world

technology@lemmy.world

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: !technology@lemmy.world

This is a most excellent place for technology news and articles.


Our Rules


  1. Follow the lemmy.world rules.
  2. Only tech related news or articles.
  3. Be excellent to each other!
  4. Mod approved content bots can post up to 10 articles per day.
  5. Threads asking for personal tech support may be deleted.
  6. Politics threads may be removed.
  7. No memes allowed as posts, OK to post as comments.
  8. Only approved bots from the list below, this includes using AI responses and summaries. To ask if your bot can be added please contact a mod.
  9. Check for duplicates before posting, duplicates may be removed
  10. Accounts 7 days and younger will have their posts automatically removed.

Approved Bots


  • @L4s@lemmy.world
  • @autotldr@lemmings.world
  • @PipedLinkBot@feddit.rocks
  • @wikibot@lemmy.world
Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 2.46K users / day
  • 8.44K users / week
  • 17.6K users / month
  • 39K users / 6 months
  • 1 local subscriber
  • 72.5K subscribers
  • 12.3K Posts
  • 470K Comments
  • Modlog
  • mods:
  • L3s@lemmy.world
  • enu@lemmy.world
  • Technopagan@lemmy.world
  • L4sBot@lemmy.world
  • L3s@hackingne.ws
  • L4s@hackingne.ws
  • BE: 0.19.8
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org