U++ framework
Do not panic. Ask here before giving up.

Home » U++ Library support » U++ Core » Writing Bits object to disk
Re: Writing Bits object to disk [message #47940 is a reply to message #47939] Tue, 25 April 2017 13:35 Go to previous messageGo to previous message
crydev is currently offline  crydev
Messages: 151
Registered: October 2012
Location: Netherlands
Experienced Member
Thanks for your replies Mirek! I fixed my testcases, I realized I had a wrong check in my loop. The results now are:

index.php?t=getfile&id=5247&private=0

Then, I applied your optimizations, and Bits became a little faster. However, It still is not as fast as Vector<bool>.

index.php?t=getfile&id=5248&private=0

Quote:
Any ideas about the proper "raw data" interface?


I thought about making a constructor that allows construction of Bits from an existing buffer.

I also thought about vectorizing Bits set method. In theory, we could gather 16 bools, invert the bits in this bool, such that the most significant bit is 1 if the bool value is true, and 0 if it is false. Then, the _mm_movemask_epi8 intrinsic will generate an instruction that directly converts these 16 bools to a bitmask. We can also assume that 0x80 is true, for our inverted bool. Smile

crydev
  • Attachment: new.PNG
    (Size: 9.66KB, Downloaded 1183 times)
  • Attachment: Capture.PNG
    (Size: 9.73KB, Downloaded 1194 times)

[Updated on: Tue, 25 April 2017 13:43]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: StringStream has Put,but no Remove funcs
Next Topic: stable sort bug.. or looks like it
Goto Forum:
  


Current Time: Wed Sep 23 23:09:21 GMT+2 2026

Total time taken to generate the page: 0.01012 seconds