timotheecour / D_vs_nim

comparison of D vs nim
Apache License 2.0
63 stars 14 forks source link

runtime performance #11

Open mratsim opened 6 years ago

mratsim commented 6 years ago

I think performance all come down to data structure + programmer familiarity with the language + time spent.

Now there are domain specific considerations that can make a huge difference, and most Nim library authors publish extensive benchmarks of their solutions compared to their mainstream alternative

Generic need in the wild, parsing files

Domain specific

Http server:

Functional programming

Numerical/scientific computing

This is my domain so I know much more about it.

Open questions

timotheecour commented 6 years ago

thanks! PR's welcome to incorporate your points so they don't get lost!

timotheecour commented 6 years ago

added https://github.com/timotheecour/D_vs_nim/commit/208b717c49fe452672df5074eb597f71f2aac61f to address some points above (marking them as checked)

timotheecour commented 6 years ago

/cc @mratsim

D cannot disable (?) the GC at specific point.

what do you mean? see https://dlang.org/library/core/memory/gc.disable.html

ghost commented 6 years ago

@timotheecour it has some limitations though: Collections may continue to occur in instances where the implementation deems necessary for correct program behavior, such as during an out of memory condition.

mratsim commented 6 years ago

@timotheecour hence the question mark ;) I don't know D.

By the way regarding: D has the advantage of having access to register size and L1 cache or L2 cache size at compile-time when using LDC. This was used in Mir, full article here. I have also seen L1 cache size dependent code in mir library.