Hi guys, I was messing around in ICE tring to build my own version of Helghe's Pixel Particles... Since I'm doing it all in ICE (as opposed to Custom ICE Nodes in C++), and since there is a fair bit of calculation involved it turned out to be very slow.
I therefore had to extensivly use Performance Timers (which are freaking awesome to have by the way) to find the bottlenecks... One of them was related to a bounding box calculation where I evaluated 4 different conditions (>x, <x, >y, <y) together with a AND node (first image).
I found out a much better way to do that is to filter out the data for every condition since it will only evaluate the remainder of the elements in that set. (seccond image). This is great for calculating bounding box, and I found it useful elswere in that ICETree also.
Cheers!
Intersting Optimization with Filters
Intersting Optimization with Filters
- Attachments
-
- Connecting conditions to AND node
- andFilter.JPG (54.26 KiB) Viewed 1416 times
-
- Filtering out each step, much better :)
- filterChain.JPG (49.84 KiB) Viewed 1416 times
Gustavo Eggert Boehs
Blog: http://www.gustavoeb.com.br/
Blog: http://www.gustavoeb.com.br/
-
- Posts: 56
- Joined: 09 Nov 2009, 10:58
Re: Intersting Optimization with Filters
Great tip! Thanks!
Re: Intersting Optimization with Filters
Moderator edit: To not needlessly confuse you all, gustavoeb is refering here to a post of mine, I had already deleted, before he posted his. As I found he was already in the process of posting the video I asked for, in another thread, I deleted that post... - HB
there was a old one already, also related to speed optimizations (yes this is really slow ):
viewtopic.php?f=15&t=1954&p=15693#p15693
I've updated it with a little video of the compound.
will comment the compound a bit better and share it as soon as I have time for it
there was a old one already, also related to speed optimizations (yes this is really slow ):
viewtopic.php?f=15&t=1954&p=15693#p15693
I've updated it with a little video of the compound.
will comment the compound a bit better and share it as soon as I have time for it
Gustavo Eggert Boehs
Blog: http://www.gustavoeb.com.br/
Blog: http://www.gustavoeb.com.br/
Re: Intersting Optimization with Filters
Very good tip, thank you!
Who is online
Users browsing this forum: No registered users and 69 guests