()
| 237 | |
| 238 | #[test] |
| 239 | fn test_cache_efficiency() { |
| 240 | let mut arena = Arena::new(); |
| 241 | |
| 242 | // Create many duplicate terms |
| 243 | for _ in 0..100 { |
| 244 | arena.mk_var(0); |
| 245 | } |
| 246 | |
| 247 | // Should have high cache hit rate |
| 248 | assert!(arena.cache_hit_rate() > 0.95); |
| 249 | assert_eq!(arena.terms(), 1); |
| 250 | } |
| 251 | } |