Open lanceXwq opened 3 years ago
That’s a good point. I was following along another example so that’s why I wrote it that why. I feel like by doing what you suggested you would be eliminating one level of abstraction that Julia has to do at compile time, which could speed things up.
I will give it a try. Funny that you sent this today, because I’ve been watching a few talks on Julia today. JuliaCon is soon, so hopefully there will be some interesting things to check out then
I guess an abstract type makes more sense if it contains multiple composite types, just like your AbstractUnitCell
.
I'm also working on some code in Julia so I'm now "nitpicky" about types and performance.
This is also my practice of using Github since my lab now has an account. Probably I'll also submit a couple of pull requests, please don't take them too seriously, and you can close this issue any time you like. :)
Hello Harry,
Just spent some time browsing your code, awesome work! Here are a couple of questions of mine.
struct
is called, it defines a composite type, correct? So I wonder why you also define an abstract type for each one of them.how about
which may have better performance.