ã«ã¼ãã«ã¦ã³ã¿ã64bitã«ãããã ãããã¡ã®ãµã¤ãºãå®æ°ã«ãããããã©ã¼ãã³ã¹æ¿è½ã¡ãªãã ãã©ä½ã§ï¼ c++ - Replacing 32bit loop count variable with 64bit introduces crazy performance deviations - Stack Overflow stackoverflowã§ãèå³æ·±ã質åãè¡ããã¦ããã ç°¡åã«ã¾ã¨ããã¨ããã ãstd::uint64_tåã®é åã®åè¦ç´ ã«x86-64ã®popcnt(1ã«ãªã£ã¦ãããããæ°ãæ°ããå½ä»¤)ãé©ç¨ãããã ã³ã¼ãã®èå¿ã®é¨åãæ¸ãã¨ã以ä¸ã®ããã«ãªãã for (unsigned i=0;i<size/8;i+=4) { count+=_mm_popcnt_u64(buffer[i]); count+=_mm_popcnt_u64(buffer[i+1]); coun
{{#tags}}- {{label}}
{{/tags}}