« first day (22 days earlier)      last day (18 days later) » 

12:09 PM
And
> Success: 75616 out of 75616 (100.0%)
Rather naive revamp, which still uses the old FixRTL building block:
 
llm
you went from intrustrial grade to god-like
 
        term_
            = simple_ [_val = _1] >> *(
               (qi::no_case[_binops] >> simple_) [_val = make_binary(_val, _2, _1)]
            );
@llm :)
The naive version seems to improve on allocation times (I did include tcmalloc though so I might be skewing if I didn't do that first time around).
Actual number of dtor calls seems to be exactly the same. Constructor calls is actually increased (!). That's more indication that the time improvement is more down to libtcmalloc than something else.
^ ctor calls (pid 7244 is new build)
 
llm
so you initial goal of optimization led to slower code? that is my usual optimization story - at least there is always a scenario where my "better" code is far worse than before
 
Hopefully a telling pic:
Screenshot has amusing chat popup that doesn't block anything :)
@llm Nah. It leads to more control over attribute flow. I stayed close to the existing building blocks to get to 100% test ok again. Now I know I have a few options to actually improve (leveraging move semantics and preventing binary variant visitation).
I might be able to do away with the Simplify step - in the event that the result ends up not introducing the same kind of redundant sub-expression nodes
Context:
Apr 5 at 10:56, by sehe
Somewhat surprisingly, some of the resulting Asts have redundant leveels of recrusive variant wrappers. I consider this a bug(?)/limitation of the Spirit attribute propagation rules. (Expression a, b; a = b; would invoke the copy-constructor, not the conversion-assignment. Apparently Spirit rules do not consider this special case and perform "element assignment" to Expression even if the type is already Expression. There is something to be said in favour of this behaviour I guess)
 
llm
i've never use that UI but the images are lovely, Expressions raised but everything else is less work
 
12:22 PM
Yup. And bear in mind the net time win could be just down to faster allocator library
 
llm
i like your "it functional done" now make it faster attitude
are copying screenshot together or can you have a old and new session parallel in the UI
are you
 
@llm Both at once, just kcachegrind callgrind.out.* and enable the "Parts Overview"
Kcachegrind is more powerful than you'd say at first glance
 
llm
i had (before corona) a planned project to optimize a linux base tcp/ip communication software - if i ever get back to this i will try Kcachegrind
every heard of X-Ray Framework (part of LLVM/Clang) for benchmarking?
 
@llm Me too. It's the patient route. But it yields return. I had a similar epiphany when I finally sat down and "just got over with" the actual precedence level table
@llm I think I heard of it, but it doesn't have a tangible meaning to me yet
 
12:38 PM
Just pushed:
commit 1fe8931e375bb9a004d36fae1c6212b8afe9bc34 (HEAD -> master, github/master)
Author: sehe <sgheeren@gmail.com>
Date:   Fri Apr 17 14:34:35 2020 +0200

    Flatten the term_ rule

    This removes the levels of rule recursion.

    In practice the grammar still recurses, but it gives control over AST
    production to the semantic action(s).

    I hope this will prove to enable optimization by using move-semantics
    (should really help with recursive_wrapper and variant?)

    This commit merely moves precedence-level awareness into
@llm Returning the favour in ad-rem manner: open.spotify.com/album/…
 
llm
i've got my spotify account only on the tablet :{
my = my wifes account
 
It's Keith Jarrett playing WTC
(I have for years known his 24 preludes and fugues from Shostakovich, which is absolutely stunning, but only now found out he had done Bach's as well)
Now, I have got to do boring stuff first. Be back later
 
1:38 PM
Yup
 
llm
something to destress
 
 
2 hours later…
3:44 PM
@llm Pushed newness:
5a3a017 (github/master) Clean up Parser (parse_expression and exceptions)
c6865a5 Remove signals2 dependency
 
llm
newness aka lessnewness
newless
 
Certainly. Always newless
Now, back to boring stuff (admining laptop for in-law). Reckon windows update is done
Teehee. Who was I fooling. Of course it "needed to reboot"
 
llm
its windows, but even linux needs more and more reboots on update
my in-law uses linux - not because of windows is evil, her uncle installed it on her first computer 12 years ago and she wants linux on every new system
 
My mom was on linux for the longest time (because I found it easier to admin)
 
llm
reduces the amount of the virus target pcs - and i've never had any admin stuff todo for her, only updates
 
3:50 PM
I switched her back to windows after Win10
@llm I think it is actually less-and-less. It has hot-patching kernels these days. Interesting to know when you need reboots for linux updates
(Of course hot-patching is usually only enabled on servers, but I meant to gesture a general tendency)
 
llm
ok im not using hot kernel patching
could be the reason, but usual once in a month or so - on ubuntu 18.04,19.10
 
I never reboot due to updates. Last time I rebooted was due a power outage
4 hours ago, by sehe
Rather naive revamp, which still uses the old FixRTL building block:
Fingers crossed: now building full tests with FixRTL visitor removed.
If that pans out I'll apply move semantics (carefully because Spirit Qi isn't move-ware. Knowing how attributes flow in Qi I expect it to be perfectly fine, but still will apply ubsan/asan).
 1 file changed, 11 insertions(+), 21 deletions(-)
Always a great sign
 
4:21 PM
> Success: 75616 out of 75616 (100.0%)
Also, noticing a bottleneck in the parser. I'm going to give it a shot in the dark and predict it will be due to backtracking here:
Apr 6 at 12:29, by sehe
And here's the punch line: simple_ will fail to match in the case of e.g. a<>b (which will first try using a< as it has higher precedence)
Ooh, this time it made a solid dent in the runtime:
time ./test.exe ast str eval > /dev/null

real    0m0,497s
user    0m0,484s
sys     0m0,009s
That's down ~50%
Expression ctor/dtor no longer register as significant cost in parsing. (parsed was renamed parse_expression)
(note that the width of the different parts is significant: it shows total overal runtime of different runs)
 
llm
@sehe good old pascal - so its needs to be != ?
 
I have the sentimental connection too. But yeah, it will be funny if it backtracks just because of that.
I feel Simplify is an interim target here
 
llm
50% is much
 
4 hours ago, by sehe
I might be able to do away with the Simplify step - in the event that the result ends up not introducing the same kind of redundant sub-expression nodes
@llm :agreeing:
More newnessp pushed
cc10d00 (github/master) Remove unnecessary simplify of expected ast
503cf03 Optimize make_<Binary> to not use a visitor
 
5:01 PM
40 mins ago, by sehe
Also, noticing a bottleneck in the parser. I'm going to give it a shot in the dark and predict it will be due to backtracking here:
So, the median time to run each 1k ast checks is 5.85ms.
However, the max is 9.9ms and the range is 6.3ms. Third quantile is still 5.9. Go figure.
As always, a char says more than a thousand stats:
So it's just initial cost (it could be that a larger part of the observed speed up was due to moving the grammar construction into a static....)
And the last unit being quick is just because it's fewer checks.
Now THIS is what I was seeing. When running under valgrind we get this hefty spike:
Something is up in unit cl
 
llm
after longtime analyse i can clearly say that something is going on with cm
 
Yeah that's rubbish axis. It's cl. 29s under valgrind
So, once again, the predicted bottleneck was WRONG: grep -c '<>' check_ast_??.cpp | sort -t: -k2n
check_ast_bs.cpp:16
check_ast_bx.cpp:56
check_ast_cv.cpp:80
check_ast_cq.cpp:120
check_ast_ch.cpp:136
check_ast_cl.cpp:160
check_ast_cm.cpp:176
check_ast_cg.cpp:200
check_ast_cr.cpp:216
check_ast_cw.cpp:256
check_ast_bw.cpp:280
check_ast_br.cpp:320
check_ast_ad.cpp:336
check_ast_ai.cpp:336
check_ast_an.cpp:336
check_ast_as.cpp:336
check_ast_ax.cpp:336
check_ast_bc.cpp:336
check_ast_bh.cpp:336
check_ast_bm.cpp:336
check_ast_cd.cpp:440
check_ast_by.cpp:600
check_ast_bz.cpp:1000
check_ast_ca.cpp:1000
I wouldn't be surprised if the actual bottleneck is in valgrind.
It emulates opcodes. If the emitted machine code somehow triggers a sub-optimal emulation it might cause weirdness like this. I will still try to zoom in of course
Silly goat. When run in isolation, there is no peak whatsoever. cl and cm run in "equal" time
Wut. The spike is reproducible when running all. Let's skip cl
Okay. It's a phantom phenomenon. Skipping cl makes the lag happen in cm, by 29s as well. As the callgrind data didn't show that confusing spike, I declare it a non-problem
 
llm
5:56 PM
@sehe time to give XRay a try, but you need a recent LLVM/clang :)
 

« first day (22 days earlier)      last day (18 days later) »