On Thursday, 11 May 2017 at 21:09:05 UTC, Timon Gehr wrote:
[...]
Yes, this works and is a few times faster.
It's slightly faster when inlining the condition:
static foreach(fn;__traits(allMembers, functions)){
static if (isFunction!(__traits(getMember, functions, fn))
&&
On Thursday, 11 May 2017 at 21:57:06 UTC, Timon Gehr wrote:
On 10.05.2017 16:28, Stefan Koch wrote:
On Wednesday, 10 May 2017 at 14:03:58 UTC, Biotronic wrote:
On Wednesday, 10 May 2017 at 11:45:05 UTC, Moritz Maxeiner
wrote:
[CTFE slow]
First, as you may know, Stefan Koch is working on an
On 10.05.2017 16:28, Stefan Koch wrote:
On Wednesday, 10 May 2017 at 14:03:58 UTC, Biotronic wrote:
On Wednesday, 10 May 2017 at 11:45:05 UTC, Moritz Maxeiner wrote:
[CTFE slow]
First, as you may know, Stefan Koch is working on an improved CTFE
engine that will hopefully make things a lot
On 10.05.2017 16:03, Biotronic wrote:
A few things here - functions.fn would not do what you want, and neither
would __traits(identifier).
functions.fn would treat "fn" like a part of name, not a string value,
so this will make the poor compiler barf.
__traits(identifier, fn) expects fn to be
On Wednesday, 10 May 2017 at 14:03:58 UTC, Biotronic wrote:
As for making the code faster right now, could this be done
with mixin templates instead?
Something like:
import functions = llvm.functions.link;
import std.meta, std.traits;
template isCFunction(alias member)
{
static if
On Wednesday, 10 May 2017 at 14:03:58 UTC, Biotronic wrote:
On Wednesday, 10 May 2017 at 11:45:05 UTC, Moritz Maxeiner
wrote:
[CTFE slow]
First, as you may know, Stefan Koch is working on an improved
CTFE engine that will hopefully make things a lot better.
As he already pointed out, it
On Wednesday, 10 May 2017 at 14:03:58 UTC, Biotronic wrote:
On Wednesday, 10 May 2017 at 11:45:05 UTC, Moritz Maxeiner
wrote:
[CTFE slow]
First, as you may know, Stefan Koch is working on an improved
CTFE engine that will hopefully make things a lot better.
It will not; This is issue is
On Wednesday, 10 May 2017 at 11:45:05 UTC, Moritz Maxeiner wrote:
[CTFE slow]
First, as you may know, Stefan Koch is working on an improved
CTFE engine that will hopefully make things a lot better.
As for making the code faster right now, could this be done with
mixin templates instead?
So, after being asked to support dynamic loading in llvm-d[1] at
DConf 2017 I essentially had the following two options:
- have two separate declarations of the bindings, one with the
function signatures (linking) and one with function pointers
(loading)
- Have one declaration and derive the