Phase 3

(Warning that this is a rather wordy post: most of the tests/results/code modified will be located in my github posted below instead of here).
This is the wrap up for the project I selected. To recap,  I chose to try to optimize stdio.h.  I attempted to speed up specifically the w+ mode of fopen function, which is defined in libio/stdio.h. Hopefully I will be able to finish up what I’ve started during summer during my work term. SPO600 was an interesting course. The labs were a nice build up towards how to actually approach this project, and it was a little scary trying (and failing) to contribute to the open source community. This felt more like a real world experience than many of the classes at Seneca, where many of those labs/assignments have a very narrow field of application (i.e, requirements are already given, just code the functionality, etc). Nowhere were run-times needed or diving into the actual assembly of said code necessary, nor worrying about optimizing my code as long as it worked. It was a good experience to put concepts learned about optimization (attempt to) into software used in the open source community (glibc)

Having done tracing files and tracking down where to make changes I found it very challenging/difficult to find where to focus on in the code. Honestly, some of the changes I made did not create any meaningful results OR resulted in things “breaking” (test file not working in the way i expected, runtime upped).

I have not tried to make a pull request or send it upstream because I did not make any significant progress that is worth uploading in my opinion. I also did not reach the stage of testing another architecture aside from AArch64, simply because of what’s stated above (no point testing on other archtectures for speed if it doesn’t even necessarily speed up on the AArch64).

A huge difficult in working on the project was isolating a specific area of code to work with. I found it hard to isolate an obvious area where improvements could ACTUALLY be made. Searching through multitude of different files to try to locate where the w+ mode for fopen (in stdio.h) could be optimized was extremely difficult. First of all, I could not locate what I planned to modify’s source code (ending up tracing it to the int open function, but could not find the actual source code which does not make sense to me, since i have the latest version of glibc).

Another personal difficulty for me was just the allocation of my time spent into this optimization. Unfortunately, due to circumstances I wasn’t able to allot the time I wanted to this project, having prioritized family matters and other unfortunate events. This was warned at the start of this course to work on this project over a long period of time and that will be a lesson learned.

For future large assignments I would approach things differently. Its apparent that it’s always better to start earlier and work in smaller chunks rather than big ones, but also rather that unlike most school labs/assignments that are small in scope which can be done by oneself, I have to reach out sooner for help on larger tasks as people

Now, with a better understanding of what is involved in undertaking a project like this, here is how I would approach something like this again, especially since I plan to continue what I’m doing here during the summer. If I decide to undertake a project like this in the future I will reach out to the community sooner to ask their advice instead of relying almost exclusively on my own research. There are always people with more expertise on subjects, and its a waste not to use those resources. By working on something consistently, it also gives time for me to reach different resources (resources that may not always get back to you, etc). This would give me more insight into my project/assignments.

the link to my github is:  https://github.com/dleung25/

Above is where I’ve put my previous work, labs, and (hopefully) future implementation where I can find where to properly optimize this with an actual meaningful lower run-time for my tests.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: