Re: Edita on 4.0b3 (r3124)

new topic     » goto parent     » topic index » view thread      » older message » newer message
petelomax said...

Of course I immediately tried something else ("if filetext[1]=filetext[1] then", if you must know) which ran fine on r3132 but gave me problems on Phix. So, I examined your mods to parser.e, which gave me two thoughts:

Phix? Is this you eu implemented in assembly (formerly in Parrot)?

petelomax said...

(NB: this is now firmly in low-priority territory)

First, you may not need the additional code. My analysis (I use different opcodes to you, remember) was that only 8 things create dangerous refcounts (move?, subscript, slice, append, prepend, concat, repeat, and make sequence), and only 8 things "clone" due to non-1 refcounts (replace element, replace slice, append, prepend, concat, make sequence, repeat, and of course any form of call). Hence eg:

    if length(filetext[1]) then 
        flag = 1 
    end if 

Whether you can avoid the extra code in such cases is another matter.

Yes, that's possibly a next place to go. I'd started doing something like this, but the way I'd gone about it was too complex and buggy. So I backtracked to the way things were before, and we get more additional reference counts than we technically need, but don't accidentally miss a place with an op where we didn't normally need it, but did in some circumstances. This becomes especially important when you start using delete routines, which are incredibly useful.

The translator does a bit better on these counts, as it sometimes has a little extra information about what's going on. At least, the reference count is decremented closer to the increment, since it can afford a bit more processing when looking at opcodes.

petelomax said...

Secondly, the beast that is the hidden temp of function return values:

    -- snipped 

Much less severe than previous examples, about 6x slower (not at all bad compared to the expected 100,000 times slower!), and as said no impact on any real-world code, just thought you might like to know.

I don't get slower results at all using svn:3133. Here were my results (both runs had with trace, and the second had without inline):

$ eui func 
with:3.29s, without:3.30 
 
$ eui func 
with:3.28s, without:3.29 

Perhaps a difference with how refcounts are dealt with? Was the 6x with Phix or eu?

Matt

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu