• ZILtoid1991@lemmy.worldOP
    link
    fedilink
    arrow-up
    3
    ·
    2 days ago

    When I wrote my numerical parser, people told me to use regexes to detect what kind of numerical value is being parsed. I just did it in one go. Only regex-like checking is for ISO datetime values.

    • Gil, The Shitposter Of Ages@lemmy.dbzer0.com
      link
      fedilink
      English
      arrow-up
      2
      arrow-down
      2
      ·
      2 days ago

      regex is computationally pretty cheap, from what I’ve read; due to something about it being a simple AND gate or something… . IDR, and to be honest it doesn’t really matter in the era of 16-core/32thread 5GHz processors… but when you just want it to work… it does “just work”. /shrug.

      • da_cow (she/her)@feddit.org
        link
        fedilink
        arrow-up
        2
        ·
        1 day ago

        Saying that performance doesnt matter anymore is what brought us AAA games running at 20fps on the most powerfull Consumer Hardware available at the time (yes, Im talling about you Jedi Survivor)