tag:blogger.com,1999:blog-834134852788085492.post5035695301776988234..comments2024-03-02T07:59:30.808+01:00Comments on RealTime Data Compression: Fast sequence comparisonCyanhttp://www.blogger.com/profile/02905407922640810117noreply@blogger.comBlogger5125tag:blogger.com,1999:blog-834134852788085492.post-52166476453812089242014-12-09T00:50:38.800+01:002014-12-09T00:50:38.800+01:00This comment has been removed by the author.Anonymoushttps://www.blogger.com/profile/18222975209877827442noreply@blogger.comtag:blogger.com,1999:blog-834134852788085492.post-26285004309914233072014-02-15T22:21:51.888+01:002014-02-15T22:21:51.888+01:00Hi Zed,
I welcome any suggestion that can lead to ...Hi Zed,<br />I welcome any suggestion that can lead to a faster chain comparison algorithm.Cyanhttps://www.blogger.com/profile/02905407922640810117noreply@blogger.comtag:blogger.com,1999:blog-834134852788085492.post-54785282890239432102014-02-15T20:09:08.875+01:002014-02-15T20:09:08.875+01:00if (*(bytePos+len) == *(ComparePos+len)) len++; ma...if (*(bytePos+len) == *(ComparePos+len)) len++; may be compiled to cmov/setcc. the only problem is how to force compiler to do itZedhttps://www.blogger.com/profile/17464441238899441016noreply@blogger.comtag:blogger.com,1999:blog-834134852788085492.post-56263962645618586662013-05-22T21:05:22.307+02:002013-05-22T21:05:22.307+02:00Very interesting. Thanks for the helpful comment.Very interesting. Thanks for the helpful comment.Cyanhttps://www.blogger.com/profile/02905407922640810117noreply@blogger.comtag:blogger.com,1999:blog-834134852788085492.post-20379344689492434952013-05-18T16:58:36.743+02:002013-05-18T16:58:36.743+02:001. ARM supports unaligned access since ARMv6, so e...1. ARM supports unaligned access since ARMv6, so even old CPUs like ARM11 support this ("The initial ARM11 core (ARM1136) was released to licensees in October 2002" - Wikipedia). You are unlikely to find ARMv5 CPUs in hardware you are interested in supporting. You should still check during compilation, though.<br /><br />2. Advanced memcmp implementations have used two strategies in the unaligned case:<br />2.1. when both sides have the same offset from correctly aligned, you merely process the bytes until the next word boundary and then do the aligned word loop.<br />2.2. when the offsets differ, it is still sometimes possible to gain performance by doing word-aligned reads and shift one of the sides when comparing words.<br /><br />On x86, the slowness of unaligned loads to SSE registers cause people to do such tricks.Zeevhttps://www.blogger.com/profile/12468742992535608146noreply@blogger.com