This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdint.h> | |
#include <windows.h> | |
#include <intrin.h> | |
uint64_t collatz_count_ref(uint64_t n) { | |
uint64_t count = 0; | |
while (n > 1) { | |
n = (n % 2 == 1) ? 3 * n + 1 : n >> 1; | |
count++; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// collatz_bench.cpp : コンソール アプリケーションのエントリ ポイントを定義します。 | |
// | |
#include "stdafx.h" | |
#include <stdlib.h> | |
#include <stdint.h> | |
#include "xbyak/xbyak.h" | |
#include "xbyak/xbyak_util.h" |
NewerOlder