167
edits
Changes
ParaCode
,→Assignment 2
We are going to work on 'Grep' project.<br>
Through the profile, we can see that the most cost of the runtime is 'grep()' and 'convert_char_to_string()' functions. <br> Let's go and see the basic variables in code:<br>[[File:BasicVar.JPG|650px]] First, I first look at function 'convert_char_to_string()'. I think it's no necessary to use this function, so I remove it.<br>
[[File:StringremoveJPG.JPG|650px]]
Then, we start working in grep function. As file size growing up, which means more characters in file, the runtime of 'grep()' grows much more faster than the other functions. So we are going to work on 'grep()' function.<br>
Let's going through grep() function:<br>