The number of operations is staggering...

Published:

Just for the pick 3 evening, that is the longest draw history, the code will step through the draw data in each column, which is over 17,000 draws 10 billion times. That's per column... 3 columns plus the evaluation of the current outcome to the top 3 list means that just that game will take an estimated 500 TRILLION operations.

This is why the run time estimate is still in the hundreds of years.

Cython is going to take much more time and work than originally thought. I may end up having to add that to windows just to do the development.

There is an interim technology I have planned to try called PyPy, which is a just in time python interpreter that runs in place of python and uses python code directly, no C conversions necessary. In general offering 7x speed ups, but in the case of what I am doing, it could be hundreds or thousands of times faster. Or not. At it's face, the python program cannot be run fully, and although I have taken the estimated run time down from 3,000 years to 554 years, it is obviously too ambitious of a project... for now.

As of the current time, it was a nice thought exercise, but not practical to run. Not giving up just yet, but the likelihood of running over a quadrillion operations is not in the cards with Python.

Other languages to be considered are obviously C, but also taking a good look at Rust as well.

The Cython output was way too fragmented to learn from, but now that I know the algorithm, it is just a matter of doing the same thing in another language. As a result this will drag out the process much longer than I had hoped, and now that the next class started, I might not be able to even look at it for the next 9 weeks.

Oh well, it has been an educational journey so far for sure.

Entry #287

Comments

This Blog entry currently has no comments.

Post a Comment

Please Log In

To use this feature you must be logged into your Lottery Post account.

Not a member yet?

If you don't yet have a Lottery Post account, it's simple and free to create one! Just tap the Register button and after a quick process you'll be part of our lottery community.

Register