all 12 comments

sorted by: hot top controversial new old
[–] [S] 11 points 2 weeks ago

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

  • source
  • [–] 5 points 2 weeks 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.

  • source
  • [–] 5 points 2 weeks ago (3 children)

    Amazing. It's so weird, I was just needing to do this same operation and was looking into some of the bithacks. Although I don't have the ability in the language to fully utilize this, I am astounded by how lean you made it.

  • source
  • hideshow 3 child comments
  • [–] [S] 2 points 2 weeks ago (2 children)

    How interesting! What language are you using? I've ported a couple of these ilog10 methods to different languages so perhaps I could be of some help! Thank you though! It was a long process to get it this fast and lean!

  • source
  • parent
  • hideshow 2 child comments
  • [–] 3 points 2 weeks ago (1 child)

    Java. I could certainly use a lot of what you wrote, but I don't know nearly enough about the JVM to take it as far as you did.

  • source
  • parent
  • hideshow 1 child comment
  • [–] 4 points 2 weeks ago (1 child)

    Fun read, thanks for sharing ♥️

  • source
  • hideshow 1 child comment
  • [–] 3 points 2 weeks ago (1 child)

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

  • source
  • hideshow 1 child comment
  • [–] 1 point 1 week ago

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

  • source
  • 3 comments in c/c_lang@programming.dev view that post
    [–] 4 points 2 weeks ago (2 children)

    Impressive work and an interesting write-up. Kudos!

  • source
  • hideshow 2 child comments
  • [–] [S] 4 points 2 weeks ago (1 child)
  • [–] 4 points 2 weeks ago

    It's more satisfying than ever to see people still questioning prevalent assumptions and critically reassessing the fundamentals. Lately, I've been writing a lot of DSP code in C, and that has certainly proven a valuable exercise for much the same reasons you demonstrate here.

    ...With the added fun of dealing with numerical stability, of course.

  • source
  • parent
  • 1 comment in c/programming@beehaw.org view that post
    [–] 1 point 1 week ago

    As someone who rarely programs anything, and who hasn’t touched assembly for over 40 years, that was a great read and a fascinating (math) journey.

  • source