Hi, On Thu, Jun 23, 2016 at 08:28:46PM +0800, Fengguang Wu wrote: > When the color cube slot is found to be already occupied by a similar > 24-bit color, search through the -1, 0, +1 R/G/B indices trying to find > an empty slot, or the oldest used one (which hopefully is no longer in > active use). > > This effectively reduces random collisions, hence make it pretty hard to > hit a vim GUI color scheme that cannot be correctly showed in urxvt.
thanks for the patch! The general idea looks sensible. I have two preliminary comments, general principle being simplicity over speed: - Is the speed gain given by hashing significant enough to justify the additional space of 'rgb24_index'? - IIUC, the new code, when all the slots in the neighbourhood are used, reuses the oldest mapped slot rather than the slot onto which the color is initially mapped. Does this provide any significant improvement to justify the additional code and space of 'rgb24_seqno'? Emanuele _______________________________________________ rxvt-unicode mailing list [email protected] http://lists.schmorp.de/mailman/listinfo/rxvt-unicode
