On Tuesday, 15 April 2014 at 15:57:13 UTC, Robert Schadek wrote:
Lately I had to write some sqlite3 code in D. And I really hated writing it. So I wrote me some CTFE generator for it. It uses all the fun UDA, CTFE string mixin template magic, we all love. The generated code is as
fast as the hand written one. I wrote some of it down.
http://rburners.tumblr.com/ The article also holds a link to the
source/benchmark. Maybe this is to some interest to other people as well.


Best Regards
Robert

p.s. PRs and corrections welcome

Some quick observations:

1) toStringz(insertStmt) -> as inserStmt is actually a string literal, no need to use toStringz, literals are alway null-terminated.

2) in block immediately after `throw` has extra level of indentation

3) excessive sqlite3_finalize(stmt), one from first scope(exit) should have been enough

Will read actual article a bit later :P

Reply via email to