Interesting performance data-point
Steven Schveighoffer
schveiguy at gmail.com
Tue Dec 31 17:35:02 UTC 2024
On Tuesday, 31 December 2024 at 15:36:31 UTC, Don Allen wrote:
> As I've mentioned in previous messages, I've ported my personal
> finance package from C to D, having first ported some of it to
> Rust until I just couldn't stand it anymore.
>
> One of the utilities that exists in both the D and Rust
> versions reads .csv files downloaded from American Express and
> loads the transactions into the Sqlite database that contains
> my financial data, trying to assign an expense account to each
> incoming transaction by fuzzy-comparing the transaction's
> description to existing transactions, using an algorithm based
> on Levenshtein distance. The Levenshtein calculation is done
> using a user-defined Sqlite function that is loaded as an
> extension.
>
> What I've found is that the D version of this utility is about
> twice as fast (compiled with DMD) as the Rust version to get
> identical results. While I haven't done detailed enough
> measurements to explain the performance disparity with
> certainty, I've done enough to know that both versions spend
> most of their time in the Levenshtein distance function.
Great read! Yeah, I think the interoperability with C is very
much a super-power of D.
-Steve
More information about the Digitalmars-d
mailing list