foo86 / dcadec

DTS Coherent Acoustics decoder with support for HD extensions
117 stars 40 forks source link

Optimize struct sizes #48

Closed f2404 closed 8 years ago

f2404 commented 8 years ago

Optimize struct sizes in memory by reordering their members.

TimothyGu commented 8 years ago

This breaks ABI.

MarcusJohnson91 commented 8 years ago

DCADec hasn't been declared stable, so who cares?

TimothyGu commented 8 years ago

There has been a release, but if you guys are willing to break ABI this soon then ¯\(ツ)

f2404 commented 8 years ago

Better to break it now than later :)

Nevcairiel commented 8 years ago

Don't really need to break at all just to save 4 bytes of memory, but in the end thats foo86's decisison.

jamrial commented 8 years ago

"Optimize struct dcadec_core_info size" requires a soname major bump since a release has been made, and for a four bytes gain it sounds pointless IMO.

The rest should be fine, i guess.

foo86 commented 8 years ago

I'll reject this. Changing public structures like this is not allowed without breaking backwards compatibility. Overall, I prefer structure fields to be logically grouped as they are now, unless there is a noticeable benefit doing otherwise (saving just a few bytes of memory doesn't count).