Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Idk how else to contact you: would you be interesting in solving another challenge? #3

Open
iSeiryu opened this issue May 22, 2024 · 1 comment

Comments

@iSeiryu
Copy link
Contributor

iSeiryu commented May 22, 2024

https://www.youtube.com/watch?v=pSvSXBorw4A

Rules: https://github.com/PlummersSoftwareLLC/Primes/blob/drag-race/CONTRIBUTING.md#rules

C# is slower than Java here.
Here is the currently fastest C# solution: https://github.com/PlummersSoftwareLLC/Primes/tree/drag-race/PrimeCSharp/solution_4

@noahfalk
Copy link
Owner

I'd think about it, but probably not right away at least. Just curious, what piqued your interest in this one now? From the looks of it the video is over a year old and the entries are many years old. You mentioned C# being slower than Java but I'm not certain what counts as the leaderboard? Looking at this link: https://plummerssoftwarellc.github.io/PrimeView/report?id=5406&hi=False&hf=False&hp=False&fi=&fp=mt&fa=wh~ot&ff=uf&fb=uk~ot&tp=False&sc=pp&sd=True shows a C# entry at 14th and Java at 41.

Are you interested in making a faster C# entry? I took a quick look and as best I can tell it seemed like the entries that do the best are probably the ones that get closest to clearing one prime multiple every assembly instruction. The top entries looked like they used source generation techniques to write unrolled loops to do long sequences of or operations against constant masks that could be embedded as immediate operands. I don't see any reason you couldn't do the same thing with a source generator for C#.

@github-staff github-staff deleted a comment May 27, 2024
@github-staff github-staff deleted a comment May 27, 2024
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

No branches or pull requests

2 participants