Still learning all about Cython

Published:

Updated:

Progress is slower than anticipated. Cython may be the last ditch effort to get the program to run in a reasonable amount of time, but it is not as simple as the examples have shown.

Generating the c file was straightforward enough, but then when using gcc to compile it, there was a missing python.h header file that I had to include in the compile command.

Figured that out, now stuck with literally hundreds of "resource undefined" errors thrown by the gcc compiler.

From the research so far, it looks like the Pandas library headers must also be included.

I also have to rerun the setup file and include an --embed tag in the cythonize command.

With these hurdles to clear I am left with several options, the two most likely are

1. Continue to resolve reference errors until it works.

2. Write the program directly in C.

I may end up doing something like writing directly to C, but python is the language I solved the problem with... it is my go to, but not very efficient at fast execution because it does not let you explicitly declare data types. The constant inference from the 19 variables in the code are definitely a bottleneck.

Again, if it were easy everyone would be doing it.

On the Pi itself, awesome little computer! I set up SSH so it can be run without a monitor, keyboard or mouse.

Transferring the files is accomplished with FileZilla on secure FTP, and PuTTY was not necessary as ssh is built right into Windows power shell!

There is a program to allow connecting to the visual part (x windows) but we are going for low overhead so the setup is functional.

2 classes left, and the next one starts Thursday and looks to be daunting... "Data mining and Machine learning"... so my experiment time will be limited.

I could have given up when the first time test indicated 3,000 years. I could throw in the towel with the current Python estimated run time of 554 years... almost a 6x boost... but that is not the goal.

Ever forward...

Entry #285

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