Thread overview | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
August 23, 2012 Mono-D v0.4.1.2 - Heavily improved performance + Completion bugs removed | ||||
---|---|---|---|---|
| ||||
Hi everyone, Right after the GSoC finished (I'm really sure I passed :)), I've just found more time to improve things drastically: By using a nice combination of storing AST children both sorted by name in a dictionary and in normal list, I was able to increase the resolution performance extremely - that means it takes ~0.3 milliseconds instead of ~3ms to resolve a normal symbol like a local variable or a local class definition. As a side effect, UFCS completion and preparation right after startup gained a maximum of performance boost! Tooltips and (later on) semantic highlighting could be done even more faster :) Then I fixed several issues with template parameter deduction - and figured out several bugs or a kinda undefined behaviour of dmd: class A(T) { class SubClass {} } class C(U: A!W.SubClass, W){} class D : C!(A!int.SubClass) { } // is not allowed, but A!int is -- why? Furthermore I fixed the parameter completion on this() and super() expressions, what implies a great usability bonus imho. Not to forget all the classic null-check issues and smaller bugs. Cheers, Alex http://mono-d.alexanderbothe.com https://github.com/aBothe/Mono-D/issues |
August 23, 2012 Re: Mono-D v0.4.1.2 - Heavily improved performance + Completion bugs removed | ||||
---|---|---|---|---|
| ||||
Posted in reply to alex | alex wrote:
> Then I fixed several issues with template parameter deduction - and
> figured out several bugs or a kinda undefined behaviour of dmd:
>
> class A(T) {
> class SubClass {}
> }
> class C(U: A!W.SubClass, W){}
> class D : C!(A!int.SubClass) { } // is not allowed, but A!int is -- why?
try marking SubClass with static keyword.
|
August 23, 2012 Re: Mono-D v0.4.1.2 - Heavily improved performance + Completion bugs removed | ||||
---|---|---|---|---|
| ||||
Posted in reply to Piotr Szturmaj | On Thursday, 23 August 2012 at 23:23:39 UTC, Piotr Szturmaj wrote:
> alex wrote:
>> Then I fixed several issues with template parameter deduction - and
>> figured out several bugs or a kinda undefined behaviour of dmd:
>>
>> class A(T) {
>> class SubClass {}
>> }
>> class C(U: A!W.SubClass, W){}
>> class D : C!(A!int.SubClass) { } // is not allowed, but A!int is -- why?
>
> try marking SubClass with static keyword.
This works indeed, but nervertheless not for templated sub classes like
... { static class SubClass(U) {} }
|
August 24, 2012 Re: Mono-D v0.4.1.2 - Heavily improved performance + Completion bugs removed | ||||
---|---|---|---|---|
| ||||
Posted in reply to alex | http://i3.kym-cdn.com/entries/icons/original/000/004/128/BRILLIANT_.jpg Great work as always, Alex :D |
August 24, 2012 Re: Mono-D v0.4.1.2 - Heavily improved performance + Completion bugs removed | ||||
---|---|---|---|---|
| ||||
Posted in reply to F i L | F i L wrote:
> http://i3.kym-cdn.com/entries/icons/original/000/004/128/BRILLIANT_.jpg
>
> Great work as always, Alex :D
Yes! This is really good project! :)
|
August 24, 2012 Re: Mono-D v0.4.1.2 - Heavily improved performance + Completion bugs removed | ||||
---|---|---|---|---|
| ||||
Posted in reply to alex | On Fri, 24 Aug 2012 01:18:25 +0200
"alex" <info@alexanderbothe.com> wrote:
>
> class D : C!(A!int.SubClass) { } // is not allowed, but A!int is -- why?
>
IIRC, I've had problems doing anything complex in a no-paren template parameter. I always figured if you're doing no-parens, it had to be a single token (Maybe I'm wrong?). Does it work if you do this?: A!(int.SubClass)
|
August 24, 2012 Re: Mono-D v0.4.1.2 - Heavily improved performance + Completion bugs removed | ||||
---|---|---|---|---|
| ||||
Posted in reply to alex | On 2012-08-24 01:18, alex wrote: > Hi everyone, > > Right after the GSoC finished (I'm really sure I passed :)), I've just > found more time to improve things drastically: > > By using a nice combination of storing AST children both sorted by name > in a dictionary and in normal list, I was able to increase the > resolution performance extremely - that means it takes ~0.3 milliseconds > instead of ~3ms to resolve a normal symbol like a local variable or a > local class definition. > As a side effect, UFCS completion and preparation right after startup > gained a maximum of performance boost! Tooltips and (later on) semantic > highlighting could be done even more faster :) > > Then I fixed several issues with template parameter deduction - and > figured out several bugs or a kinda undefined behaviour of dmd: > > class A(T) { > class SubClass {} > } > class C(U: A!W.SubClass, W){} > class D : C!(A!int.SubClass) { } // is not allowed, but A!int is -- why? > > Furthermore I fixed the parameter completion on this() and super() > expressions, what implies a great usability bonus imho. Not to forget > all the classic null-check issues and smaller bugs. That sounds great. I think it's time I give Mono-D a try. -- /Jacob Carlborg |
August 24, 2012 Re: Mono-D v0.4.1.2 - Heavily improved performance + Completion bugs removed | ||||
---|---|---|---|---|
| ||||
Posted in reply to Nick Sabalausky | > IIRC, I've had problems doing anything complex in a no-paren template
> parameter. I always figured if you're doing no-parens, it had to be a
> single token (Maybe I'm wrong?). Does it work if you do this?:
> A!(int.SubClass)
primitive or identifier, iirc
|
August 24, 2012 Re: Mono-D v0.4.1.2 - Heavily improved performance + Completion bugs removed | ||||
---|---|---|---|---|
| ||||
Posted in reply to Piotr Szturmaj | On Friday, 24 August 2012 at 00:10:03 UTC, Piotr Szturmaj wrote:
> F i L wrote:
>> http://i3.kym-cdn.com/entries/icons/original/000/004/128/BRILLIANT_.jpg
>>
>> Great work as always, Alex :D
>
> Yes! This is really good project! :)
Thanks :D
|
August 24, 2012 Re: Mono-D v0.4.1.2 - Heavily improved performance + Completion bugs removed | ||||
---|---|---|---|---|
| ||||
Posted in reply to Nick Sabalausky | On Friday, 24 August 2012 at 02:40:43 UTC, Nick Sabalausky wrote:
> On Fri, 24 Aug 2012 01:18:25 +0200
> "alex" <info@alexanderbothe.com> wrote:
>>
>> class D : C!(A!int.SubClass) { } // is not allowed, but A!int is -- why?
>>
>
> IIRC, I've had problems doing anything complex in a no-paren template
> parameter. I always figured if you're doing no-parens, it had to be a
> single token (Maybe I'm wrong?). Does it work if you do this?:
> A!(int.SubClass)
It's working just with the subclass marked as static and without any further template paramters, not with A!(int.SubClass) but with A!int.SubClass :)
|
Copyright © 1999-2021 by the D Language Foundation