Skip to content

Add Digit Scanner#5

Open
michaelkleber wants to merge 18 commits intoMysticial:masterfrom
michaelkleber:master
Open

Add Digit Scanner#5
michaelkleber wants to merge 18 commits intoMysticial:masterfrom
michaelkleber:master

Conversation

@michaelkleber
Copy link

The Digit Scanner feature scans through the digits of pi until every string of length d has appeared, and reports which string took the longest to show up and how many digits of pi it took.

The goal is to extend https://oeis.org/A036903 and https://oeis.org/A032510 to at least d=12 and maybe to d=13. (With a random string of 314 trillion digits, the probability of seeing all 13-digit sequences is around 80%.)

The Digit Scanner feature scans through the digits of pi until every string of length d has appeared, and reports which string took the longest to show up and how many digits of pi it took.

The goal is to extend https://oeis.org/A036903 and https://oeis.org/A032510.
Copyright notice
Copyright notice
@michaelkleber
Copy link
Author

Note: The code here does memory prefetching using __builtin_prefetch() which is the GCC / Clang way to do it. For Visual Studio we'd need to instead use _mm_prefetch(). But it seems risky for me to write code for that when I don't have a Visual Studio environment to even build it in, much less test its performance.

@michaelkleber
Copy link
Author

OK, I'm inept at interacting with GitHub from inside Visual Studio, but this should now build, run, and even prefetch memory in Windows too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant