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
yeah just with the time that eruby takes
btw how far can you go in hana?
on your machine? for filter for example
for me in D it is somewhere between 10k and 100k that I run out of memory
Jason Rice
@ricejasonf
It would probably take a long time to get to 10k if it could :P
but hana:tuple would have to store each value wrapped in an integral_constant
I think we would have to make something like hana::experimental::types for integrals for it to be a fair comparison
Maik Klein
@MaikKlein
I can filter a type tuple of size 1000 a 100times and it takes 0.65seconds.
Jason Rice
@ricejasonf
what is the filter predicate?
Maik Klein
@MaikKlein
enum isEven(alias i) = i % 2 is 0;
Jason Rice
@ricejasonf
are you saying that i is a type?
Maik Klein
@MaikKlein
no it just needs to support the modulo operator
in this case its a type tuple with ulongs
so kinda big
nvm
it is also of type int
Maik Klein
@MaikKlein
okay it seemed to cache the type instantiations, so I mixed it up filtering 100 times a 1000 element list with isEven takes 10 seconds.
it still fails if I try to filter a 10k list 10 times
Maik Klein
@MaikKlein
filtering 20 times a 1000 element list takes 20 seconds. I'll do "real" benchmarks later.
Unfortunately with libstdc++ it blows up at 256 recursive template instantiations inside std::make_index_sequence (I think)
that filter function is optimized for integrals (I think :grin: )
so it should be more "apples to apples" for your comparison
Jason Rice
@ricejasonf
So, on my intel-nuc it takes .17s for 250. 250 on my macbook air takes .27s. 10k on my air takes .8s
6.1s with 100k
Jason Rice
@ricejasonf
1M explodes with a message about a possible infinite loop at 46s :laughing:
500k isn't much better
Jason Rice
@ricejasonf
So D doesn't look like a panacea for metaprogramming, but that static if thing looks like it could save some headaches.
Jason Rice
@ricejasonf
I heard they are trying to get something like if constexpr(x) in C++17.
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