2008/12/30 Henri Verbeet <hverb...@codeweavers.com>: > > > From f6e4f88407491db8bb53d22d526f69b9ff761aaf Mon Sep 17 00:00:00 2001 > From: Henri Verbeet <hverb...@codeweavers.com> > Date: Tue, 30 Dec 2008 14:56:49 +0100 > Subject: wined3d: Convert some BOOLs to bitfields in struct > IWineD3DDeviceImpl. > > Also fills a 3 byte hole. > --- > dlls/wined3d/device.c | 17 +++++---------- > dlls/wined3d/nvidia_texture_shader.c | 2 +- > dlls/wined3d/state.c | 4 +- > dlls/wined3d/wined3d_private.h | 36 > ++++++++++++++++----------------- > 4 files changed, 26 insertions(+), 33 deletions(-)
How many instances of this structure are likely to be in a process at any one time? It seems to me as though as any memory savings gained by making the BOOLs into bitfields will be taken up by increased code size. There is also the risk that there will be a small performance penalty for this and the other similar changes too. These kinds of optimisations need to be backed up by benchmarks, for both memory and performance. -- Rob Shearman