Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jan 31 15:06

    ldionne on gh-pages

    Update benchmarks to 490dbf6 fo… (compare)

  • Jan 24 07:47

    ldionne on gh-pages

    Update benchmarks to 490dbf6 fo… (compare)

  • Jan 23 02:04
    pthom commented #432
  • Jan 18 12:46

    ldionne on gh-pages

    Update benchmarks to 490dbf6 fo… (compare)

  • Jan 16 22:27
    ricejasonf commented #434
  • Jan 05 06:22
    ricejasonf commented #330
  • Jan 03 11:40

    ldionne on gh-pages

    Update benchmarks to 490dbf6 fo… (compare)

  • Jan 02 00:33
    ricejasonf closed #434
  • Jan 02 00:33
    ricejasonf commented #434
  • Jan 02 00:04
    ricejasonf opened #434
  • Dec 27 2018 13:11

    ldionne on gh-pages

    Update benchmarks to 490dbf6 fo… (compare)

  • Dec 22 2018 11:56
    pthom commented #432
  • Dec 22 2018 11:55
    pthom commented #432
  • Dec 21 2018 15:48
    pthom synchronize #432
  • Dec 21 2018 09:19
    sdebionne opened #433
  • Dec 21 2018 00:08
    ricejasonf commented #432
  • Dec 21 2018 00:03
    ricejasonf commented #432
  • Dec 20 2018 23:36
    pthom commented #432
  • Dec 20 2018 23:36
    pthom commented #432
  • Dec 20 2018 23:13
    ricejasonf commented #432
Maik Klein
@MaikKlein
I just created a small framework that generates some code at runtime into a string, creates a file, compiles the created file and measures the time.
filtering 100k elements takes 100s
while 10k takes 1.6s
Jason Rice
@ricejasonf
that's with pregenerating the code before the benchmark?
Maik Klein
@MaikKlein
I don't even know why it takes that long for 100k elements, I still have enough ram left.
yeah
Actually c++ is surprisingly fast
Jason Rice
@ricejasonf
did you try the c++ version with the pregenerated code? I bet std::make_range is the slowdown
Maik Klein
@MaikKlein
no I haven't compiled the c++ version yet, I just saw your timings.
Jason Rice
@ricejasonf
I mean std::make_index_sequence
If you used std::index_sequence<0, 1, 2, ...>...
It would be interesting to see where it breaks. :P
Maik Klein
@MaikKlein
I am currently only generating D code
500k elements is still running since a few minutes, my ram is almost gone :d
Jason Rice
@ricejasonf
I tried that with 1M and it still craps out after 45s with the same error messages. It must be a limit on variadic templates.
which sounds reasonable enough :D
Maik Klein
@MaikKlein
@ricejasonf btw did you subtract the baseline from the timings that you have posted before?
Jason Rice
@ricejasonf
no.. would that be just including the files?
Maik Klein
@MaikKlein
yeah probably, I am still baffled that it compiled so fast, I try to compile it myself later.
Jason Rice
@ricejasonf
baseline (including the function definitions) is about 0.17s
Jason Rice
@ricejasonf
@ldionne It kind of looks like map inserts improved too. Is that right?
at least the gap looks narrower
Maik Klein
@MaikKlein
just an update, the metafunctions from my post are much much slower than hana.
But the meta stuff from the std in D are pretty close to hana. Although they are not as nice to use.
Louis Dionne
@ldionne

@ricejasonf

It kind of looks like map inserts improved too. Is that right?

I did not do any changes to insert, so it shouldn't have improved. But the benchmark for insert is actually broken, since the size of the map in which we're inserting changes. So the improvement you notice should be the improvement of creating the map before we insert in it.

About the whole conversation you guys had on March 1: LMFAO. I am incredibly surprised and pleased by these preliminary results, and I think we should investigate further. I mean, if D turns out to be worse than C++ for compile-time speed, there's a huge problem because the language was apparently designed (in part) to be good for metaprogramming. And D evangelists keep throwing shit at C++ for the compile-times, so that better be based off some real data!

Not that I want a war with D, far from that. But I think this data might point out places where D could improve.
Joshua T. Fisher
@playmer
Dude, don't make Bright come in here and whoop us.
Louis Dionne
@ldionne
lol
@ricejasonf Regarding constexpr lambdas, I’ve no idea if Clang trunk supports them, but I’d say no for now. But they’re going to be in C++17 for sure.
And I’ve written a paper to allow lambdas in unevaluated contexts. I’m waiting for the end of the Jacksonville meeting to post it on std-proposal. I’m hoping that it can get in C++17 too at Oulu.
Jason Rice
@ricejasonf
cool
Jason Rice
@ricejasonf
I just pulled clang's git master last night and it does not appear to support constexpr lambdas
clambda.cpp:5:16: error: constexpr function's return type '(lambda at clambda.cpp:6:10)' is not a literal
      type
@ldionne any luck with that builtin?
Louis Dionne
@ldionne
No luck yet. The patch is still under review, but I think the reviewers have other things on their hands.
I also implemented a builting for slicing parameter packs, but I won’t push it for review until the first one is in.
Jason Rice
@ricejasonf
is it still named nth_element
Louis Dionne
@ldionne
It’s almost trivial to implement builtins in Clang :p.
No, it got changed to __type_pack_element.
Jason Rice
@ricejasonf
I was playing with AST matchers. It seems incredibly difficult to get all locations of the use of a type's name.
Louis Dionne
@ldionne
That, I don’t know!
But writing builtins is a walk in the park. I could never have figured it out myself, but David Majnemer implemented the __make_integer_seq builtin and all I had to do was walk in his footsteps.
Maik Klein
@MaikKlein
Yeah I was also very surprised lol. I was mostly working for some "toy" example before . This gave me some incentive to do some actual benchmarks.
The fastest way is actually generating strings at compile time because I can avoid recursion that way.
But generating strings is a huge memory hog.
Maik Klein
@MaikKlein
btw if you are mostly unfamiliar with D, I recently wrote a blog post about the differences in C++ and D. https://maikklein.github.io/2016/03/03/CppAndD/
It's not quite finished yet and my markdown generator seems to be broken :(
Maik Klein
@MaikKlein
If you are crazy enough to read this and spot some obvious mistake, please let me know
Jason Rice
@ricejasonf
@MaikKlein I don't know if this is a compiler hack per se, but I made a simple show_if function that is useful for dumping information about a type when a condition is met. https://github.com/ricejasonf/nbdl/blob/master/src/mpdef/ShowIf.hpp
Maik Klein
@MaikKlein
@ricejasonf No 100% sure what it does, but it seems to force an error when you want to show it right? Not saying its not useful but in D you can give really nice static assert messages because of this. I have the string hack somewhere in my c++ codebase