1
edit
Changes
→Chad's Profiling Findings
====Chad's Profiling Findings====
I started with [http://pointersgonewild.wordpress.com/2012/12/31/turing-drawings/ this] blog post I found and the demo that Maxime Chevalier-Boisvert (the original creator) posted as a github page [http://maximecb.github.com/Turing-Drawings/# here]. Make sure to press random a few times to see the different results. She also posted the source code [https://github.com/maximecb/Turing-Drawings here], the only issue was that it's all written in JavaScript. My biggest main task for completely the assignment was to somehow port the code into C++. The biggest challenge while porting was migrating from a loosely typed language to a strongly typed one, but I managed in the end to successfully port and compile the code. I'm sure there's a lot of cleaning up I can do with my C++ code, but this first assignment was more just a proof of concept than anything else. I decided to scrap the randomization part of the original program for now because I want to have consistent profile results every run. I chose to focus on the seed found [http://maximecb.github.com/Turing-Drawings/#6,4,1,2,0,1,3,1,4,3,3,1,3,0,5,2,1,4,2,0,2,1,1,4,1,0,1,3,0,5,1,3,1,1,3,0,1,1,2,3,3,5,1,1,3,1,0,3,1,2,1,1,1,1,3,3,3,2,2,2,3,3,2,1,3,5,3,0,2,3,2,4,1,1 here] because who doesn't love the Matrix. I also decided to only generate 1000 images each time the program is run. After profiling I determined that 99% of the run was being spent in two functions, 89% and 10% respectively. The code for the two functions is below.