62832 / AppliedE

Direct ProjectE EMC integration with Applied Energistics 2.
https://curseforge.com/minecraft/mc-mods/appliede
GNU Lesser General Public License v3.0
6 stars 5 forks source link

perform op with total emc less than long in single call #10

Closed Wireless4024 closed 5 months ago

Wireless4024 commented 5 months ago

I have no idea if my code give correct behavior but it make tick time from ~300ms down to < 1ms and allocation rate from 5GiB/s to <50MiB/s when pipe items too fast into interface (kristi should already told you about setup). extended me io port max upgrade can perform idk 50k or 100k items per tick but your code doing O(n) per tick, and then it implode garbage collector with massive biginteger allocation. please review and adapt it. thank you.

I know I can do the biginterger part in single call but idk if behavior still correct.

62832 commented 5 months ago

It'll take a while before I manage to look over this PR fully and touch it up, since the last few commits I've made when discussing with Kristi have been very sleep-deprived and a bit haphazard. I'll most likely be redoing those commits since the last released build to take any optimisations one step at a time.

62832 commented 5 months ago

Closing this since it's occurred to me that something else can be done altogether to completely eliminate any of the current overhead.