Difference between revisions of "User:Ssvb"

From D Wiki
Jump to: navigation, search
(Associative arrays and hash collisions: ahash)
Line 1: Line 1:
 +
== D language for programming competitions ==
 +
 +
Not everything is perfect:
 +
 +
* Hash tables are vulnerable: https://issues.dlang.org/show_bug.cgi?id=7179 and https://codeforces.com/contest/1676/submission/156707849
 +
* Arithmetic overflows detection is not the best
 +
* 128-bit data type is missing
 +
* [https://github.com/dlang/phobos/blob/master/std/bigint.d std.bigint] is slow (not using GMP as a backend)
 +
* [https://github.com/dlang/phobos/blob/master/std/random.d std.random] is slow: https://codeforces.com/blog/entry/99292#comment-881097
 +
 
== GDC tips and tricks ==
 
== GDC tips and tricks ==
  

Revision as of 23:11, 10 May 2022

D language for programming competitions

Not everything is perfect:

GDC tips and tricks

GDC 11+ requires "-flto" or "-fno-weak-templates" option to avoid a major performance regression: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102765

Shared library linking workaround to run phobos unit tests: https://bugzilla.gdcproject.org/show_bug.cgi?id=199

Demangle symbols: https://dlang.org/phobos/std_demangle.html

Mingw build and test instructions: TODO

Arithmetic overflows

TODO: create a new DIP? https://forum.dlang.org/post/rclilxjpnjvexggncfhd@forum.dlang.org

TODO: Atomic operations and arithmetic overflows?

TODO: Unsigned overflows?

GDC supports "-ftrapv" easter egg option for trapping signed overflows.

Relevant links:

GCC history of -fno-strict-aliasing and -fwrapv:

Associative arrays and hash collisions

https://forum.dlang.org/post/navsnrjweslsqeaawsev@forum.dlang.org

Relevant links: