News for hackers. Stuff that matters.
Re:D as a Better C by srcmap on Wednesday August 23, 2017 @02:46PM (#15084036)
I love to see someone prove D as a Better C by porting the "small" sqlite 124K line of C code to D and run some benchmark/test code against it.

I used to work on OO database engine that handles billions of records.

I end up rewriting/overloading my own new/delete and redesign everything how data is load/store around it. Shorten the open/close document time from hours to seconds for large documents.

Basically, one can easily mmap billions of records directly into data structures accessible by C API easily in a few ms. One can dispose billions of records also in a few ms. I saw similar design patterns from the sqlite code base.

Language with memory safety (GC) design in mind won't allow anything like that as far as I know.

I love to see some D experts prove me wrong.

Re:D as a Better C by zombinedev on Wednesday August 23, 2017 @03:39PM (#15084424)
D provides the same low-level access as C. Heck, in D you can even use inline assembly, so there are really no barriers to what you can achieve. MMaping files and casting their contents to structures is often used technique. The GC only one of the many ways of getting memory in D. You'll just have to manage the other ways yourself like in C or C++ ;)
Re:D as a Better C by jmh530 on Wednesday August 23, 2017 @04:14PM (#15084648)
Could you recommend some resources on these techniques?
Re:D as a Better C by anonfunction on Wednesday August 23, 2017 @11:24PM (#15087383)