Fix issue 16705 - TaskPool.reduce fails to compile "cannot get frame pointer to D main"#4915
Conversation
|
Current coverage is 89.23% (diff: 100%)@@ stable #4915 diff @@
==========================================
Files 121 121
Lines 76196 76203 +7
Methods 0 0
Messages 0 0
Branches 0 0
==========================================
+ Hits 67989 68001 +12
+ Misses 8207 8202 -5
Partials 0 0
|
|
Auto-merge toggled on |
|
Seeing two timelimit errors, can you look into reducing the duration of unittests for std.parallelism? |
|
Sure, I will lower |
…pointer to D main"
|
@andralex updated. |
| // TaskPool.reduce: 12.170 s | ||
| // std.algorithm.reduce: 24.065 s | ||
| // TaskPool.reduce: 4.011 s | ||
| // std.algorithm.reduce: 1.067 s |
There was a problem hiding this comment.
The timings are switched, right?
There was a problem hiding this comment.
The timings are for the large case. They are much lower, because I used LDC and a more powerful CPU.
There was a problem hiding this comment.
So TaskPool.reduce is slower than the serial algorithm?
There was a problem hiding this comment.
Oh sorry, I didn't notice this before. Yes indeed the two timings should be swapped. I will submit a PR soon.
|
Could you also comment on why the compiler generated "cannot get frame pointer to D main" ? |
Fix typo introduced in PR #4915
|
@mihaipopescu the compiler error message is because since My change has two fixes in it:
At first glance this looks like a compiler regression, because the original code works with older compilers (up to DMD 2.068.2), but I need to investigate further, because it may be the case that
|
|
Thank you @ZombineDev for the detailed explanation. I was actually able to understand and fix what was wrong in my own code. It would be very useful if the D reference compiler would have its errors standardised so users could understand what they are doing wrong. |
|
This shouldn't have said |
|
@MartinNowak agreed, but at first I thought that only the documentation needed to be fixed. After further investigation I came to the conclusion that there probably was a regression in the compiler, but at that time the PR had already been merged. |
At the time std.parallelism was developed, module-level ddoc-ed unittests weren't available and probably that's why nobody noticed that example from the module synopsis broke.