From: SourceForge.net <no...@so...> - 2012-12-21 06:42:34
|
Bugs item #3598016, was opened at 2012-12-20 22:42 Message generated for change (Tracker Item Submitted) made by vaneyli You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=396644&aid=3598016&group_id=29557 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: vaneyli (vaneyli) Assigned to: Nobody/Anonymous (nobody) Summary: Smallobject benchmark in qtcreator,ubuntu,notebook Initial Comment: output shows : the speed of the smallobject is much slower than the default, also the boost!!! why? please help me:) I've downloaded. the newest code . //part of output Allocator Benchmark Tests with 2 bytes big objects new = global new/delete sizeof(A) = 2 SmallObj = Loki::SmallObject sizeof(B) = 8 ValueObj = Loki::SmallValueObject sizeof(C) = 2 boost = boost::object_pool sizeof(D) = 2 allocator= std::allocator sizeof(A) = 2 malloc = std::malloc/free sizeof(A) = 2 1000000 times 'delete new T' new : seconds: 40 relative time: 100% speed-up factor: 1 SmallObj : seconds: 280 relative time: 700% speed-up factor: 0.14 ValueObj : seconds: 270 relative time: 675% speed-up factor: 0.15 boost : seconds: 50 relative time: 125% speed-up factor: 0.8 allocator: seconds: 60 relative time: 150% speed-up factor: 0.67 malloc : seconds: 40 relative time: 100% speed-up factor: 1 N=3 : 1000000 times 'delete[] new T[N]' new : seconds: 50 relative time: 100% speed-up factor: 1 SmallObj : seconds: 320 relative time: 640% speed-up factor: 0.16 ValueObj : seconds: 320 relative time: 640% speed-up factor: 0.16 boost : seconds: 50 relative time: 100% speed-up factor: 1 allocator: seconds: 60 relative time: 120% speed-up factor: 0.83 malloc : seconds: 40 relative time: 80% speed-up factor: 1.25 i=0...1000000 : 1. 'arr[i] = new T' 2. 'delete arr[i]' 1. new : seconds: 40 relative time: 100% speed-up factor: 1 2. new : seconds: 30 relative time: 100% speed-up factor: 1 1. SmallObj : seconds: 220 relative time: 550% speed-up factor: 0.18 2. SmallObj : seconds: 200 relative time: 667% speed-up factor: 0.15 1. ValueObj : seconds: 220 relative time: 550% speed-up factor: 0.18 2. ValueObj : seconds: 180 relative time: 600% speed-up factor: 0.17 1. boost : seconds: 30 relative time: 75% speed-up factor: 1.33 2. boost : boost::object_pool is not tested because it's too slow 1. allocator: seconds: 40 relative time: 100% speed-up factor: 1 2. allocator: seconds: 20 relative time: 67% speed-up factor: 1.5 1. malloc : seconds: 20 relative time: 50% speed-up factor: 2 2. malloc : seconds: 20 relative time: 67% speed-up factor: 1.5 ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=396644&aid=3598016&group_id=29557 |