From 018916403e32dfca3f4e593749180734e24d44aa Mon Sep 17 00:00:00 2001 From: David Aurelio Date: Thu, 9 May 2019 03:21:35 -0700 Subject: [PATCH] Reduce measure cache size to 8 Summary: @public Reduces measure cache size to a number that is enough for 95% of nodes, according to our (FB-internal) measurements. Node size: 776b -> 584b Reviewed By: SidharthGuglani Differential Revision: D15183567 fbshipit-source-id: 9ae8cc78074271a015e7618b931ba0356de87a0c --- yoga/Yoga-internal.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yoga/Yoga-internal.h b/yoga/Yoga-internal.h index dffb8672..4d32a96b 100644 --- a/yoga/Yoga-internal.h +++ b/yoga/Yoga-internal.h @@ -91,9 +91,9 @@ struct YGCachedMeasurement { } }; -// This value was chosen based on empiracle data. Even the most complicated -// layouts should not require more than 16 entries to fit within the cache. -#define YG_MAX_CACHED_RESULT_COUNT 16 +// This value was chosen based on empirical data: +// 98% of analyzed layouts require less than 8 entries. +#define YG_MAX_CACHED_RESULT_COUNT 8 namespace facebook { namespace yoga {