The Lemmy Club
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
duplexsystem@lemmy.blahaj.zone to Programming@programming.dev · 29 days ago

The Fastest (long) ilog10 in the West · duplexsystem

duplexsystem.org

external-link
message-square
8
link
fedilink
  • cross-posted to:
  • programming@beehaw.org
  • c_lang@programming.dev
47
external-link

The Fastest (long) ilog10 in the West · duplexsystem

duplexsystem.org

duplexsystem@lemmy.blahaj.zone to Programming@programming.dev · 29 days ago
message-square
8
link
fedilink
  • cross-posted to:
  • programming@beehaw.org
  • c_lang@programming.dev
A write-up of how I wrote the fastest (long) ilog10 I have been able to find.
alert-triangle
You must log in or register to comment.
  • duplexsystem@lemmy.blahaj.zoneOP
    link
    fedilink
    arrow-up
    10
    ·
    29 days ago

    Wrote my first real blog post. Let me know what you guys think!

  • palordrolap@fedia.io
    link
    fedilink
    arrow-up
    5
    ·
    28 days ago

    The repeated division trick has a quicker counterpart, which is to create a separate variable and repeatedly multiply that by 10, comparing to the original as it goes. Probably not as fast as anything beyond the repeated division trick, but I mention it because its rediscovery was likely missed by jumping right to clzl tricks.

    It also generalises a lot more readily to numbers in other bases. Kind of a “jack of all trades, master of none” solution.

  • a_non_monotonic_function@lemmy.world
    link
    fedilink
    arrow-up
    3
    ·
    28 days ago

    Fun read.

  • kamstrup@programming.dev
    link
    fedilink
    arrow-up
    3
    ·
    28 days ago

    Fun read, thanks for sharing ♥️

    • duplexsystem@lemmy.blahaj.zoneOP
      link
      fedilink
      arrow-up
      2
      ·
      edit-2
      28 days ago

      Ofc!! Thank you for reading!

  • Sibbo@sopuli.xyz
    link
    fedilink
    arrow-up
    3
    arrow-down
    1
    ·
    28 days ago

    So there is a faster one in Africa or Asia? Then why not use that?

    • duplexsystem@lemmy.blahaj.zoneOP
      link
      fedilink
      arrow-up
      1
      ·
      28 days ago

      We’re still searching for those…

  • draycs@lemmy.world
    link
    fedilink
    arrow-up
    1
    ·
    25 days ago

    How do you generate your charts? They’re very nice

Programming@programming.dev

programming@programming.dev

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: !programming@programming.dev

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person’s post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you’re posting long videos try to add in some form of tldr for those who don’t want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



Visibility: Public
globe

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

  • 373 users / day
  • 1.49K users / week
  • 3.46K users / month
  • 8.59K users / 6 months
  • 107 local subscribers
  • 29.4K subscribers
  • 3.99K Posts
  • 54.8K Comments
  • Modlog
  • mods:
  • snowe@programming.dev
  • Ategon@programming.dev
  • UlrikHD@programming.dev
  • bugsmith@programming.dev
  • Spyro@programming.dev
  • BE: 0.19.21
  • Modlog
  • Legal
  • Instances
  • Docs
  • Code
  • join-lemmy.org