Home » U++ Library support » U++ Core » Writing Bits object to disk
Re: Writing Bits object to disk [message #47950 is a reply to message #47948] |
Wed, 26 April 2017 08:50   |
crydev
Messages: 151 Registered: October 2012 Location: Netherlands
|
Experienced Member |
|
|
Mirek,
I ran your benchmark, and I found out why I get different results! Your benchmark gives me:
TIMING Bits : 194.98 ms - 194.98 us (195.00 ms / 1000 ), min: 0.00 ns, max: 1.00 ms, nesting: 1 - 1000
TIMING Vector<bool> : 362.98 ms - 362.98 us (363.00 ms / 1000 ), min: 0.00 ns, max: 1.00 ms, nesting: 1 - 1000
Constructing the Vector<bool> inside the loop also slows down the whole thing by a lot. After I moved the construction out, I got:
TIMING Bits : 183.98 ms - 183.98 us (184.00 ms / 1000 ), min: 0.00 ns, max: 1.00 ms, nesting: 1 - 1000
TIMING Vector<bool> : 102.98 ms - 102.98 us (103.00 ms / 1000 ), min: 0.00 ns, max: 1.00 ms, nesting: 1 - 1000
I pre-allocate the Vector<bool> with the Reserve(int) function, because I know what the size of the vector is going to be. This is also the case in my production application. That's why the Vector is still faster. We need a reserve function for Bits too. 
crydev
[Updated on: Wed, 26 April 2017 08:54] Report message to a moderator
|
|
|
 |
|
Writing Bits object to disk
By: crydev on Wed, 11 January 2017 17:07
|
 |
|
Re: Writing Bits object to disk
By: mr_ped on Thu, 12 January 2017 01:20
|
 |
|
Re: Writing Bits object to disk
By: crydev on Thu, 12 January 2017 09:03
|
 |
|
Re: Writing Bits object to disk
By: mirek on Fri, 13 January 2017 08:39
|
 |
|
Re: Writing Bits object to disk
By: crydev on Wed, 18 January 2017 08:51
|
 |
|
Re: Writing Bits object to disk
By: crydev on Mon, 24 April 2017 19:19
|
 |
|
Re: Writing Bits object to disk
By: mirek on Mon, 24 April 2017 21:08
|
 |
|
Re: Writing Bits object to disk
By: crydev on Tue, 25 April 2017 09:36
|
 |
|
Re: Writing Bits object to disk
|
 |
|
Re: Writing Bits object to disk
By: mirek on Tue, 25 April 2017 10:31
|
 |
|
Re: Writing Bits object to disk
By: mirek on Tue, 25 April 2017 10:34
|
 |
|
Re: Writing Bits object to disk
By: crydev on Tue, 25 April 2017 11:37
|
 |
|
Re: Writing Bits object to disk
By: mirek on Tue, 25 April 2017 11:59
|
 |
|
Re: Writing Bits object to disk
By: mirek on Tue, 25 April 2017 12:38
|
 |
|
Re: Writing Bits object to disk
By: crydev on Tue, 25 April 2017 13:35
|
 |
|
Re: Writing Bits object to disk
By: mirek on Tue, 25 April 2017 13:39
|
 |
|
Re: Writing Bits object to disk
By: crydev on Tue, 25 April 2017 14:03
|
 |
|
Re: Writing Bits object to disk
By: mirek on Tue, 25 April 2017 16:40
|
 |
|
Re: Writing Bits object to disk
By: crydev on Wed, 26 April 2017 08:27
|
 |
|
Re: Writing Bits object to disk
By: crydev on Wed, 26 April 2017 08:50
|
 |
|
Re: Writing Bits object to disk
By: mirek on Wed, 26 April 2017 13:38
|
 |
|
Re: Writing Bits object to disk
By: crydev on Thu, 27 April 2017 10:31
|
 |
|
Re: Writing Bits object to disk
By: mirek on Thu, 27 April 2017 23:50
|
 |
|
Re: Writing Bits object to disk
By: crydev on Fri, 28 April 2017 19:04
|
 |
|
Re: Writing Bits object to disk
By: mirek on Sat, 29 April 2017 09:05
|
 |
|
Re: Writing Bits object to disk
By: omari on Fri, 28 April 2017 19:31
|
 |
|
Re: Writing Bits object to disk
By: mirek on Sat, 29 April 2017 09:53
|
 |
|
Re: Writing Bits object to disk
By: crydev on Tue, 02 May 2017 22:54
|
 |
|
Re: Writing Bits object to disk
By: mirek on Tue, 02 May 2017 23:55
|
 |
|
Re: Writing Bits object to disk
By: crydev on Wed, 03 May 2017 09:00
|
 |
|
Re: Writing Bits object to disk
By: mirek on Wed, 03 May 2017 09:53
|
 |
|
Re: Writing Bits object to disk
By: crydev on Wed, 03 May 2017 11:12
|
 |
|
Re: Writing Bits object to disk
By: mirek on Wed, 03 May 2017 11:27
|
 |
|
Re: Writing Bits object to disk
By: crydev on Wed, 03 May 2017 12:24
|
 |
|
Re: Writing Bits object to disk
By: mirek on Wed, 03 May 2017 12:37
|
 |
|
Re: Writing Bits object to disk
By: crydev on Wed, 03 May 2017 18:33
|
 |
|
Re: Writing Bits object to disk
By: crydev on Sat, 06 May 2017 10:28
|
 |
|
Re: Writing Bits object to disk
By: crydev on Tue, 16 May 2017 09:12
|
 |
|
Re: Writing Bits object to disk
By: mirek on Tue, 16 May 2017 10:39
|
 |
|
Re: Writing Bits object to disk
By: mirek on Tue, 16 May 2017 13:12
|
 |
|
Re: Writing Bits object to disk
By: crydev on Tue, 16 May 2017 20:17
|
Goto Forum:
Current Time: Sat May 10 09:47:16 CEST 2025
Total time taken to generate the page: 0.02700 seconds
|