Performance of tables slower than built in?

2019-05-21 Thread JS via Digitalmars-d-learn
I am trying to create some fast sin, sinc, and exponential routines to speed up some code by using tables... but it seems it's slower than the function itself?!? The code below uses matplotlibd but is not necessary. The timing code is lower. Ideally I'd like to have quadratic interpolation an

EnumToFlags

2016-06-29 Thread JS via Digitalmars-d-learn
I created a type that makes working with flags much easier. Please review for issues and enhancements. It would be nice to simplify the value size code. struct EnumToFlags(alias E) { import std.traits, std.conv, std.string, std.algorithm, std.array; static if (E.max < 8)