Sunday, July 13, 2014

Week 5

Class:
This week was once again a short week since there was no class this past Friday due to final exams for first session classes. We continued to stress function templates and generics which were meant to assist us with the Big Integer project we were working on. I was very happy to see the professor give the class insight on setting up an eager cache within the multiplies_digits function and also give us a templated version of the power function. The BigInteger project was a great way to get exposed to objects and classes in C++ and I hope the trend continues as I am looking forward to learning more specifically about the object oriented qualities of C++ including class extension.

Project:
The BigInteger project turned out to be a big pain... But not for the same reasons it was for everyone else in class. Piazza was peppered with questions about implementation details and students hunting down mysterious bugs. Im happy to report that since my partner and I had started the project earlier, we had plenty of time to carefully optimize and think through every function and not run into serious bugs. For students that had embraced the idea of code first, test later, this week proved to be hell. The problem we had was that our code worked just fine... without any problems... just painfully slow. Wednesday night my partner and I toiled for many hours in the 3rd floor lab trying to wrap our heads around the karatsuba method which we felt would help us speed up our program. To our disappointment it was slowing us down even more. Luckily the professor had released the templated Power function which allowed us to bring our time down to within an acceptable time as per project requirements allowing us to ditch karatsuba. Even though we got the bonus points, I was really upset with the performance of our solution and stayed up till 3AM Thursday night after turning in the project. I reworked most of the project and produced an informative post in Piazza to guide other students that were stuck with the same problem. Its definitely a good read and explains how karatsuba should really be used to make things way faster.

No comments:

Post a Comment