Timeline for Fast Hardy-Weinberg equilibrium simulation
Current License: CC BY-SA 4.0
15 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Feb 2 at 15:18 | answer | added | Toby Speight | timeline score: 1 | |
Aug 27, 2018 at 18:04 | comment | added | computergorl | @chux this version should be compilable. You would also need fast_rand.h which I linked to. I would recommend -msse4.2 -mpopcnt and -Ofast | |
Aug 27, 2018 at 18:03 | history | edited | computergorl | CC BY-SA 4.0 |
added 4259 characters in body
|
Aug 27, 2018 at 15:25 | comment | added | chux | "maximum number of organisms is 65536" appears to be off-by-one. Code looks like the description should be 65535? | |
Aug 27, 2018 at 15:23 | comment | added | chux | To cursory and general comments about performance improvements does not rely on a post change. To make easy for reviewers and to provide good feedback does merit a change. Between copy-paste the whole thing and what is posted is a wide range of options that would improve. To make better, a reduced, yet compilable code snippet is work on someone's part. It adds clarity and efficiency if that is done by the poster. | |
Aug 27, 2018 at 14:40 | comment | added | computergorl | @chux The reason I didn't define any object or function definitions is that I don't use any, other than the FastRand function which I explain at length and the popcnt instruction. The whole program is probably some 10 kilobytes to do everything, which I felt was too much to just dump on someone. Thus, I trimmed it to the section of code that runs over and over again and which needs optimization rather than the full program. Because that removes context, I tried to add the context back with the explanation. Would it have been better to simply copy-paste the whole thing? | |
Aug 26, 2018 at 14:52 | comment | added | chux | @Vogel612 The post code lacks object and function definitions. From a C perspective, adding these are not burdensome for an OP - quite trivial in fact. My comment was not to suggest the code must compile and link, but to encourage OP to add enough, without undue overhead, to expiate good reviews - rather than none in 2 days. OP hints at wanting optimization. Cursory optimization is possible with incomplete code - as here. Testable and rateable optimization is possible when working code is posted here - thus making for a better question and review. | |
Aug 26, 2018 at 10:10 | comment | added | Vogel612 | @chux there is no reqirement for the code to compile directly when copied from the question. That would place an unnecessary burden to, if not prohibit any question that contains a selection of classes (or possibly even a long single method) from a larger project. It's only required that the code be working to the best of the author's knowledge. | |
Aug 25, 2018 at 23:50 | review | Close votes | |||
Aug 26, 2018 at 10:10 | |||||
Aug 25, 2018 at 23:32 | comment | added | chux | Posted code does not compile. Your question must contain code that is already working correctly | |
Aug 24, 2018 at 15:00 | history | tweeted | twitter.com/StackCodeReview/status/1033006072179687424 | ||
Aug 24, 2018 at 13:04 | comment | added | computergorl |
Sure, the complete program is here. There are no special libraries. To compile it and test for speed, use make speedtest , though you probably have to replace the gcc there with the gcc on your system. The full code is about 20kb so I didn't want to put up a ton of code that didn't really matter - I just wanted to focus on the core logic.
|
|
Aug 24, 2018 at 10:43 | comment | added | Toby Speight |
You seem to have lost your #include lines and function declaration(s), perhaps while copying from your editor - any chance you could reinstate those, to give us a complete runnable program to reproduce your results?
|
|
Aug 24, 2018 at 4:50 | history | edited | 200_success | CC BY-SA 4.0 |
added 11 characters in body; edited tags
|
Aug 24, 2018 at 4:37 | history | asked | computergorl | CC BY-SA 4.0 |