Better HN
topnewbestaskshowjobs
Log inSign up

mhath

6 karma · joined Nov 30, 2013 (12y ago) · 3 submissions

[ my public key: https://keybase.io/michaelhatherly; my proof: https://keybase.io/michaelhatherly/sigs/hfthQAEjRT4osZpg4mvw3PLayF2gcBhrt9w2y_aR448 ]
Submissions

comment 4y ago · link · parent

PumasAI | Multiple roles | REMOTE | Full-time | https://pumas.ai

Pumas-AI started two years ago with a mission to modernize and improve the efficiency of predictive health analytics, and we are making rapid progress. Our products have already impacted key decisions in these unprecedented times and there is a growing demand for real-time healthcare analytics, both in Pharmaceutical Drug Development and Precision healthcare at the bedside.

As a result, we are expanding our core team. If you are interested in building products in the healthcare space, please check out our careers page: https://pumas.ai/company/careers

comment 12y ago · link · parent

Of course halving the range checked would also be an improvement. My own improvement was meant only to reduce the memory usage of antimora's code.

comment 12y ago · link · parent

You can avoid allocating so much memory by changing

  a::Int64 = ((a%2==0) ? a : 3*a+1)/2
to

  a = ((a%2 == 0) ? a : 3a+1) >> 1
or

  a = div((a%2 == 0) ? a : 3a+1, 2)
for me this gives

  (329, 837799)
  elapsed time: 0.449473338 seconds (544 bytes allocated)
For reference the C version gives

  ./a.out 1000000  0.40s user 0.00s system 99% cpu 0.407 total