| Thread overview | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|
January 21, 2015 Data-Oriented Demo: SOA, composition via crazy 'using' | ||||
|---|---|---|---|---|
| ||||
Jonathan Blow published another video [1] presenting the progress of his language. He is treating two main topics: - a keyword preliminary called 'using' which seems to be quite close to 'alias this'; - an annotation SOA for pointers and arrays which allow high level treatment of structures of arrays; Jonathan does not seem to be aware of 'alias this' in D. -- [1] https://www.youtube.com/watch?v=ZHqFrNyLlpA [2] https://www.reddit.com/r/programming/comments/2t5ikw/jai_demo_dataoriented_features_soa_crazy_using/ | ||||
January 21, 2015 Re: Data-Oriented Demo: SOA, composition via crazy 'using' | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Fool | On 2015-01-21 19:12:20 +0000, Fool said:
> Jonathan Blow published another video [1] presenting the progress of his language. He is treating two main topics:
>
> - a keyword preliminary called 'using' which seems to be quite close to 'alias this';
> - an annotation SOA for pointers and arrays which allow high level treatment of structures of arrays;
>
> Jonathan does not seem to be aware of 'alias this' in D.
This is a very good video demonstrating the power that 'alias this' gives to people that really want to controll object layout and manage details of memory access patterns.
AoS and SoA annotations are interesting. This should be easily replicatable with the power of D's templates except for the 'robustness' part of his talk, as you would have to change declarations at invocation part to switch AoS to SoA and back.
The material in his talk would make a great blog post demostrating power of 'alias this'
| |||
January 22, 2015 Re: Data-Oriented Demo: SOA, composition via crazy 'using' | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Fool | On Wednesday, 21 January 2015 at 19:12:21 UTC, Fool wrote:
> - a keyword preliminary called 'using' which seems to be quite close to 'alias this';
By the way, what's the current status with multiple `alias this`?
| |||
January 22, 2015 Re: Data-Oriented Demo: SOA, composition via crazy 'using' | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Fool | Fool: > Jonathan Blow published another video [1] presenting the > progress of his language. He is treating two main topics: > > - a keyword preliminary called 'using' which seems to be quite > close to 'alias this'; > - an annotation SOA for pointers and arrays which allow high > level treatment of structures of arrays; > > Jonathan does not seem to be aware of 'alias this' in D. In D there is also the under-used with() statement. You can sometimes replace his "using" with "with" in D. Regarding his SOA and AOS annotations for pointers, arrays and _structures_, they are nice. Adding a SOA array in std.collections seems a good idea (but it can't cover all usages of his SOA and AOS keywords). (But I'd like some performance benchmarks that show the advantages of those things in practice). See also: http://www.reddit.com/r/rust/comments/2t6xqz/jai_demo_dataoriented_features_soa_crazy_using/ Bye, bearophile | |||
January 22, 2015 Re: Data-Oriented Demo: SOA, composition via crazy 'using' | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Fool | On Wed, 21 Jan 2015 19:12:20 +0000, Fool wrote: > Jonathan Blow published another video [1] presenting the progress of his language. He is treating two main topics: > > - a keyword preliminary called 'using' which seems to be quite > close to 'alias this'; > - an annotation SOA for pointers and arrays which allow high > level treatment of structures of arrays; > > Jonathan does not seem to be aware of 'alias this' in D. I just whacked this out in D: http://dpaste.dzfl.pl/90d96cf05792 The string mixin for the members is only necessary because there's no other way to initialize the arrays (can't use parameterless constructor, no init() function, etc.) | |||
January 22, 2015 Re: Data-Oriented Demo: SOA, composition via crazy 'using' | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Justin Whear | On Thu, 22 Jan 2015 17:40:17 +0000, Justin Whear wrote:
> I just whacked this out in D: http://dpaste.dzfl.pl/90d96cf05792
Remembered the allMembers trait, using a pointer to parent, etc: http:// dpaste.dzfl.pl/6fd66ae9b767
| |||
January 22, 2015 Re: Data-Oriented Demo: SOA, composition via crazy 'using' | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Justin Whear | On Thu, 22 Jan 2015 18:03:31 +0000, Justin Whear wrote: > On Thu, 22 Jan 2015 17:40:17 +0000, Justin Whear wrote: > >> I just whacked this out in D: http://dpaste.dzfl.pl/90d96cf05792 > > Remembered the allMembers trait, using a pointer to parent, etc: http:// dpaste.dzfl.pl/6fd66ae9b767 OK, I'm done now. 100% better: http://dpaste.dzfl.pl/4ac987a0fc5a | |||
January 22, 2015 Re: Data-Oriented Demo: SOA, composition via crazy 'using' | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Justin Whear | On Thursday, 22 January 2015 at 19:28:13 UTC, Justin Whear wrote:
> On Thu, 22 Jan 2015 18:03:31 +0000, Justin Whear wrote:
>
>> On Thu, 22 Jan 2015 17:40:17 +0000, Justin Whear wrote:
>>
>>> I just whacked this out in D: http://dpaste.dzfl.pl/90d96cf05792
>>
>> Remembered the allMembers trait, using a pointer to parent, etc: http://
>> dpaste.dzfl.pl/6fd66ae9b767
>
> OK, I'm done now.
> 100% better: http://dpaste.dzfl.pl/4ac987a0fc5a
Could you put this up on GitHub/dub? Even if simple this could be very useful.
| |||
January 22, 2015 Re: Data-Oriented Demo: SOA, composition via crazy 'using' | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Kiith-Sa | On Thu, 22 Jan 2015 21:04:04 +0000, Kiith-Sa wrote: > Could you put this up on GitHub/dub? Even if simple this could be very useful. Added some features and a dynamic array implementation, put it up here: https://github.com/economicmodeling/soa | |||
Copyright © 1999-2021 by the D Language Foundation
Permalink
Reply