1. 17
  1.  

    1. 16

      I mentioned this in a couple other places, but they are comparing against fd 8.7.1 which is before I optimized fd by 6-13x in version 9.0.0. They’re currently redoing the benchmark against the latest version of fd: https://x.com/hk_hooda/status/1885393060848161153

      1. 6

        Speed is one thing but fd was showing 10× the RAM usage

        1. 5

          Here are my results btw: (updated with the recent commits)

          Benchmark 1: ListDir
            Time (mean ± σ):     523.7 ms ±  32.6 ms    [User: 1443.9 ms, System: 7177.9 ms]
            Range (min … max):   479.2 ms … 570.0 ms    10 runs
          
          Benchmark 2: fd -u
            Time (mean ± σ):     479.5 ms ±  10.3 ms    [User: 3610.1 ms, System: 4015.8 ms]
            Range (min … max):   461.1 ms … 497.8 ms    10 runs
          
          Summary
            fd -u ran
              1.09 ± 0.07 times faster than ListDir
          
        2. 2

          Hey. What’s up with that. We can’t have another language be more Blazingly Fast! This needs to be fixed. :D

          Edit: Created https://www.reddit.com/r/rust/comments/1iekv4t/blazingfast_directory_tree_traversal_haskell/

          Edit2: The immediate feedback from our guru, which is hard to disagree with, is that traversing a single relatively small directory tree is not a proper benchmark. So the title should be amended with “on my computer, in a single relatively small case”.

          1. 12

            Maybe the lesson shouldn’t be that Haskell is “faster” but that we should just be impressed that well-written Haskell fed to GHC can produce such well-optimized programs at such a high level of abstraction

            1. 2

              Yes, I have to say the code is eminently readable, as someone who merely dabbled in Haskell, long ago.

              I thought the gnarly code would be in the libraries, but that looked fine too (I didn’t read all of it.)

          2. 2

            I wonder how they compare to LLFIO in C++, which beats other solutions I tried by, like, an order of magnitude