Thread: IPlug - Youlean
View Single Post
Old 04-29-2017, 11:55 AM   #92
Youlean
Human being with feelings
 
Youlean's Avatar
 
Join Date: May 2015
Location: Serbia
Posts: 654
Default

Quote:
Originally Posted by Soundbytes View Post
Hi Youlean,
Diving further into the code I found that you chose to use structs of vectors for the layoutContainer and the viewContainer.
I find this design a bit unfortunate since in practice you will almost never iterate over single vector elements. I think a better choice would be to use a vector of structs (layoutItems / viewItems) instead.
This has some advantages:
- smaller number of pointers to dereferences.
- much bigger chance to have data that is used together in the same cache line (64 byte on current CPUs). This is potentially a great performace booster.
- Code is (IMO) easier to understand and to maintain. (check IPlugGUIResize::AttachGUIResize)

I have refactored the files IPlugGUIResize.h and IPlugGUIResize.cpp accordingly. If you like my changes feel free to pull them into your repository.
Andreas
Can you make pull request to my repository?
Youlean is offline   Reply With Quote