
I tried to compile the example perf.cpp but I needed to link to the pthread library under linux. Otherwise I will get errors like: perf.cpp:(.text._ZN5boost10flyweights6detail27recursive_lightweight_mutexC1Ev[boost::flyweights::detail::recursive_lightweight_mutex::recursive_lightweight_mutex()]+0x1e): undefined reference to `pthread_mutexattr_init' Additionally the loop that tests value access time was optimized away so I had to print the value 's' to cout as a quick fix to this. Here are a few results on an Athlon XP 2000+, g++-4.3.2. I created a file that contained the don quichote text four times and used that as input. simple string ------------------------- initialization time: 5.33 s assignment time: 13.81 s equality comparison time: 0.42 s value access time: 14.8 s bytes used: 294747496 flyweight, hashed factory------------ initialization time: 6.39 s assignment time: 5.81 s equality comparison time: 0.42 s value access time: 11.54 s bytes used: 241724917= flyweights(240691328)+values(1033589) flyweight, hashed factory, no tracking------------ initialization time: 5.98 s assignment time: 1.32 s equality comparison time: 0.43 s value access time: 11.54 s bytes used: 241622381= flyweights(240691328)+values(931053) flyweight, set-based factory-------------------- initialization time: 7.43 s assignment time: 6.05 s equality comparison time: 0.43 s value access time: 13.34 s bytes used: 241836109= flyweights(240691328)+values(1144781) flyweight, set-based factory, no tracking--------- initialization time: 7.22 s assignment time: 1.34 s equality comparison time: 0.43 s value access time: 12.17 s bytes used: 241733573= flyweights(240691328)+values(1042245)