-
Notifications
You must be signed in to change notification settings - Fork 13
Description
Coming from #88, passing mutable structs between C and Julia interfaces requires extra copies and allocations since they are differently stored in memory. This happen very often as the API consists of multiple smaller function passing around the ClusterSequences and jet objects. Unfortunately I don't have a concrete estimate on a cost of it.
Changing the PseudoJet and EEJet to be immutable structs and isbits would allow one to remove that extra overhead.
I think it should also have a potential to improve slightly the performance on Julia side since then more continuous blocks of memory could be used.
Hopefully this should be possible with a moderate effort since the only moment when mutation is required seems to be adding history information