This file contains 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
repetitions implemetation seconds memory/kb | |
5 0original 2.88 29484 | |
5 1anyhow 2.91 29544 | |
5 2iolock 2.97 29544 | |
5 3noalloc 2.75 29520 | |
5 4singlehash 2.51 29628 | |
5 5ahash 2.06 29608 | |
5 6fxhash 1.84 29536 | |
5 7copyelision 1.51 29736 | |
5 8cleanup 1.87 29468 |
This file contains 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
fn main() { | |
let mut r = vec![1,2,3]; | |
let mut it = r.iter(); | |
println!("{:?}", it.next()); | |
println!("{:?}", it.next_back()); | |
println!("{:?}", it.next()); | |
println!("{:?}", it.next()); | |
} | |
// OUTPUT: |
This file contains 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
/// Recursively flatten an iterator and return | |
/// Args: | |
/// seq – The sequence to flatten | |
/// predicate – A function that is applied to each element in seq | |
/// to determine whether that element should also be flattened. | |
/// `(val) => val instanceof Array` would only flatten arrays, while | |
/// `(val) => val[Symbol.iterator] !== undefined` would flatten any | |
/// iterable, but should never be used because it will cause an infinite | |
/// loop flattening strings (strings are sequences of single char strings | |
/// which are sequences of itself...). |
This file contains 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
Stacktrace: | |
> inexor.exe!_VCrtDbgReportW(int nRptType, void * returnAddress, const wchar_t * szFile, int nLine, const wchar_t * szModule, const wchar_t * szFormat, char * arglist) Line 481 C++ | |
inexor.exe!_CrtDbgReportW(int report_type, const wchar_t * file_name, int line_number, const wchar_t * module_name, const wchar_t * format, ...) Line 273 C++ | |
[External Code] | |
inexor.exe!vec::min(const vec & o) Line 156 C++ | |
inexor.exe!genclipplanes(const cube & c, const ivec & co, int size, clipplanes & p, bool collide) Line 1220 C++ | |
inexor.exe!getclipplanes(const cube & c, const ivec & o, int size, bool collide, int offset) Line 22 C++ | |
from _CrtDbgReportW on were somewhere inside error reporting code probably. however checking the values of the variables inside that code reveals an error inside algorithm:4178 which is: |
This file contains 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
// LICENSE: CC-0 | |
// © 2015 by Karolin Varner | |
// invoke: $ echo boost::random::taus88 boost::random::minstd_rand0 boost::random::minstd_rand boost::random::mt11213b boost::random::mt19937 boost::random::mt19937 std::default_random_engine std::minstd_rand std::minstd_rand0 std::mt19937 std::mt19937_64 | tr ' ' '\n' |while read en; do clang -lboost_random -lboost_system -lstdc++ --std=gnu++11 -DENGINE="$en" -Wall -Wextra bench.cc -o bench; ./bench; done | sort -k2 | column -t | |
#include <boost/uuid/seed_rng.hpp> | |
#include <boost/random/taus88.hpp> | |
#include <boost/random/mersenne_twister.hpp> | |
#include <boost/random/linear_congruential.hpp> | |
#include <boost/random/uniform_int_distribution.hpp> | |
#include <boost/random/uniform_real_distribution.hpp> |
This file contains 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
// Problem: | |
// * Name und typ sind auf head und bottom aufgeteilt | |
// * Es werden zwei typen declariert | |
// | |
struct a_ { | |
int a; | |
char b; | |
double c[17]; | |
}; | |
typedef struct a_ A; |
This file contains 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
<?xml version="1.0"?> | |
<opml version="1.0"> | |
<head> | |
<title>Liferea Feed List Export</title> | |
</head> | |
<body> | |
<outline title="/" text="/" description="/" type="folder"> | |
<outline title="Newz" text="Newz" description="Newz" type="folder"> | |
<outline title="Science" text="Science" description="Science" type="folder"> | |
<outline title="NYT > Space & Cosmos" text="NYT > Space & Cosmos" description="NYT > Space & Cosmos" type="rss" xmlUrl="https://www.nytimes.com/services/xml/rss/nyt/Space.xml" htmlUrl="http://www.nytimes.com/pages/science/space/index.html?partner=rss&emc=rss"/> |
This file contains 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
/** | |
* Run and compile: | |
* | |
* gcc -o 1m1 *.c --std=gnu99 -O3 && ./1m1 20 20 | |
* | |
* Challenge: | |
* Print a table where each position (x|y) is defined like: | |
* | |
* {x*y | x=[1;9], y=[1,9]} | |
* |