| 1051 | }); |
| 1052 | |
| 1053 | function createCaches(pairs) { |
| 1054 | var largeStack = new mapCaches.Stack(pairs), |
| 1055 | length = pairs ? pairs.length : 0; |
| 1056 | |
| 1057 | lodashStable.times(LARGE_ARRAY_SIZE - length, function() { |
| 1058 | largeStack.set({}, {}); |
| 1059 | }); |
| 1060 | |
| 1061 | return { |
| 1062 | 'hashes': new mapCaches.Hash(pairs), |
| 1063 | 'list caches': new mapCaches.ListCache(pairs), |
| 1064 | 'map caches': new mapCaches.MapCache(pairs), |
| 1065 | 'stack caches': new mapCaches.Stack(pairs), |
| 1066 | 'large stacks': largeStack |
| 1067 | }; |
| 1068 | } |
| 1069 | |
| 1070 | lodashStable.forOwn(createCaches(pairs), function(cache, kind) { |
| 1071 | var isLarge = /^large/.test(kind); |