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" |
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
#include <xbyak/xbyak.h> | |
#include <xbyak/xbyak_util.h> | |
#include <stdint.h> | |
class StrlenGenerator : Xbyak::CodeGenerator { | |
public: | |
// | |
// e.g. | |
// StrlenGenerator gen(sizeof(char), true) => strlen_s | |
// |
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
struct static_tzcnt { | |
constexpr size_t operator ()(size_t x) const { | |
return (x == 0) ? (sizeof(size_t) * 8) | |
: ((x & 1)? 0 : (1 + operator()(x >> 1))); | |
} | |
}; |
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
/* | |
MP3 webserver sample, using SSCI ESPr(R) Developer with DFRobots DFPlayer mini | |
Copyright (c) 2017 Masaki Ota / MagurosanTeam | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is |
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
/* | |
最新ソース一式をこちらに移動しました | |
https://github.com/magurosan/Arduboy-LT-timer-Pronama | |
*/ | |
#include <Arduboy2.h> | |
#include "Keyboard.h" | |
#include <stdint.h> | |
#include <avr/pgmspace.h> |
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
pi@NanoPi-Fire3:~/work/JohnTheRipper/run$ ./john --test | |
Will run 8 OpenMP threads | |
Benchmarking: descrypt, traditional crypt(3) [DES 128/128 NEON]... (8xOMP) DONE | |
Warning: "Many salts" test limited: 57/256 | |
Many salts: 3662K c/s real, 462893 c/s virtual | |
Only one salt: 2417K c/s real, 342083 c/s virtual | |
Benchmarking: bsdicrypt, BSDI crypt(3) ("_J9..", 725 iterations) [DES 128/128 NEON]... (8xOMP) DONE | |
Speed for cost 1 (iteration count) of 725 | |
Warning: "Many salts" test limited: 28/256 |
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 <iostream> | |
#include <png++/png.hpp> | |
int main(int argc, char *argv[]) | |
{ | |
if (argc != 4) { | |
std::cerr << "usage: " << argv[0] << " [source.png] [mask.png] [dest.png]\n"; | |
return 1; | |
} | |
try { |
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
/* | |
require http://homepage1.nifty.com/herumi/soft/xbyak_e.html | |
g++ -O3 -fomit-frame-pointer -march=core2 -msse4 -fno-operator-names strlen_sse42.cpp && ./a.out | |
Xeon X5650 2.67GHz + Linux 2.6.32 + gcc 4.6.0 | |
ave 2.00 5.04 7.03 9.95 12.03 16.35 20.04 33.08 66.62 132.98 261.78 518.13 1063.83 | |
strlenLIBC 11.74 5.00 3.99 3.21 2.84 2.30 2.05 1.42 0.85 0.55 0.38 0.29 0.24 | |
strlenC 13.94 8.18 6.69 5.43 4.87 4.16 3.76 3.08 2.58 2.29 2.17 2.05 2.02 | |
strlenSSE2 12.72 6.30 4.97 3.81 3.27 2.55 2.20 1.53 0.94 0.56 0.36 0.25 0.19 | |
strlenSSE42 8.84 3.73 3.01 2.59 2.44 2.16 1.99 1.46 0.84 0.54 0.35 0.27 0.21 |
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
/* | |
xoshiro256+/++/* implementation for multiple instances | |
(C)2020 Masaki Ota. Some rights reserved. | |
Original codes are written by | |
2019 by David Blackman and Sebastiano Vigna ([email protected]) | |
*/ | |
#include "xoshiro256.h" | |
static void jump_common(xoshiro256_t *state, const uint64_t jump_array[4]) { |
OlderNewer