Sunday, April 17, 2022

dlang vs rust comparison (based on alimg)

Comparing dmd, ldc, rust based on the same algorithm implementation:

https://github.com/exhu/alimg/tree/master/dmd

https://github.com/exhu/alimg/tree/master/bufdither-rust


rust version is the fastest (2.5 s) vs dmd's 5 secs, ldc's 2.9 s.

rust version also consumes less memory:

Maximum resident set size (kbytes): 3716

Elapsed (wall clock) time (h:mm:ss or m:ss): 0:02.50
 

DMD: 

Maximum resident set size (kbytes): 5380

Elapsed (wall clock) time (h:mm:ss or m:ss): 0:05.28

LDC: 

Elapsed (wall clock) time (h:mm:ss or m:ss): 0:02.91

Maximum resident set size (kbytes): 8044

 

The D programming language version turned out to be easy and quick to implement as it was very close to Java/C++.

The Rust version took very long time to implement, as it required considerably more time to learn Rust's basics.

Monday, April 11, 2022

Ventoy: multiple ISO images from usb to boot

Install Ventroy on a usb, normally copy ISO files to the drive, boot.

https://www.ventoy.net/en/index.html