1. 19
  1.  

    1. 6

      I find it notable that, though the title references “rewrite it in rust”, what was tested in the paper was a fresh implementation in both C++ and Rust. This nicely avoids the issue that rewriting anything with an eye for performance will generally increase performance, regardless of the language.

      Of course, this also introduces the possibility for the C++ version to be unrealistic in one way or another. It would be interesting to see a three-way comparison; take some existing C++ program, rewrite it in both C++ and Rust, and compare the performance of all three versions.

      1. 13

        The paper says it was RiiR:

        3.2 Rust Implementation

        The Rust implementation of the CBET program was created after the C++ implementation, and was heavily based off the C++ code.

        They started with an implementation in MATLAB which was rewritten in C++ with an eye for performance.

        They also say in the previous section:

        To make a fair comparison, the C++ version used in Sec 4 is modified to be more similar to the Rust implementation as described in Sec 3.2. However, the structure of the data is different in some cases.

        Later on in section 5.2 they say the C++ version uses struct-of-arrays but Rust uses array-of-structs, but they also say that isn’t enough to explain why Rust is so much faster.

        1. 2

          Hmm, I missed that passage. I took from the paper that they wrote both the C++ and Rust implementations, but on a reread it seems ambiguous? I don’t see anything explicitly saying either way, and I couldn’t find any links to any of the source code, either.

          In any case, the fact that the C++ was a rewrite for performance in the first place indicates a more fair comparison to me.

        1. 1

          I don’t want to be overly mean or anything, but I suggested to remove the science tag. I am sure the paper has merits but it was not accepted into any conference, in fact it has been submitted to CASCON 2024 but was apparently not accepted (according to the CASCON 2024 program and google scholar).

          I don’t know much more than that.

          1. 2

            and as we all know, science only occurs when a paper is published in a journal

            anything else is just sparking engineering