Saturday, 30 November 2013

Redundant Programming


I cannot believe that it is already week 12! Next week is the last few days of the semester, which will be mostly review. This week in class we learned about efficient code writing and how to avoid redundant recursive programming. Basically, unnecessary recursive calls can slow down your code a lot, which will result with a very long wait before the function fully executes. The case that we looked at in lecture used automatic memoization to speed up the computer program. It stored all of its calculations in a dictionary and avoided any repetitive calls by referring to its dictionary to make sure that the code will not repeat the same recursion. This method greatly enhances code by cutting down its run time.

Lastly, next week will be my final SLOG entry. I am proud of myself for actually writing weekly on this blog page, as I can be very forgetful sometimes! 

2 comments:

  1. I remember I missed the lecture for this so I was actually so confused when it came up in the slide. But, a quick search on the internet clarified it pretty well!

    ReplyDelete
  2. That's good to hear! Let me know if you have any questions.

    ReplyDelete