User Tools

Site Tools


notes:comporg:projects:pnc2

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
notes:comporg:projects:pnc2 [2018/02/08 01:37] kbeykircnotes:comporg:projects:pnc2 [2018/02/11 16:50] (current) – [Benjamin Schultes PNC1:] wedge
Line 172: Line 172:
 As shown in the graph and chart, the C implemented pncs destroyed the other languages in runtime. Compiling with gccO3 gave the best performance in terms of runtime performance. It can be concluded that the lower-level language outperformed the higher-level languages in terms of runtime and qty. As shown in the graph and chart, the C implemented pncs destroyed the other languages in runtime. Compiling with gccO3 gave the best performance in terms of runtime performance. It can be concluded that the lower-level language outperformed the higher-level languages in terms of runtime and qty.
  
-===Benjamin Schultes PNC1: ===+====Benjamin Schultes PNC1:====
 ===All Scripts=== ===All Scripts===
-[[notes:comporg:projects|bschulte1.png]]+{{:notes:comporg:projects:bschulte1.png?400|}} 
 + 
 +{{:notes:comporg:projects:bschulte2.png?400|}} 
 + 
 +{{:notes:comporg:projects:bschulte3.png?400|}} 
 + 
 +{{:notes:comporg:projects:bschulte4.png?400|}} 
 As expected, the C programs outperformed all other scripts. There isn't a lot of data shown on the chart because many of the C programs had very similar run times. As expected, the C programs outperformed all other scripts. There isn't a lot of data shown on the chart because many of the C programs had very similar run times.
  
Line 193: Line 200:
 </code> </code>
  
-===Christian Cattell pnc2===+====Christian Cattell pnc2====
  
  
Line 233: Line 240:
  
 The trade-off, though, is that some of the higher-level languages looked far nicer than C did (bash being the exception), with the programs looking cleaner and probably more self-explanatory to somebody new to coding. They were also shorter… most of my C programs were around 90 to 100 lines long, most of the other programs a mere 50 to 60 lines. It’s not a huge difference here, but for longer programs the extra space spent on writing functions and generally doing things the “hard” way in C (not to mention the curly braces) could certainly add up. But when pnc1 performance is concerned, C is certainly much better than all of the other languages I used.  The trade-off, though, is that some of the higher-level languages looked far nicer than C did (bash being the exception), with the programs looking cleaner and probably more self-explanatory to somebody new to coding. They were also shorter… most of my C programs were around 90 to 100 lines long, most of the other programs a mere 50 to 60 lines. It’s not a huge difference here, but for longer programs the extra space spent on writing functions and generally doing things the “hard” way in C (not to mention the curly braces) could certainly add up. But when pnc1 performance is concerned, C is certainly much better than all of the other languages I used. 
 +
 +====Kevin Todd (ktodd3)====
 +For PNC1 I ended up using PrimeregB instead which gave some different results compared to the others who used Primeregbs
 +
 +{{:notes:comporg:projects:pnc2plot.png?|}}
 +
 +==Thoughts:==
 +
 +I was surprised by the results of my testing as Java and GO seemed to beat out the others, I expected the C++ to be the most efficient as it is a higher level language. Python was the least efficient which in hind sight isn't very surprising at it was rather easy to use would could mean it's a lower level language but it being 'easy' doesn't guarantee that it's a low level language. On the note of why C++ lost could be to a bunch of different factors; one reason it lost out may be due to how I coded the program in the other languages. I may have been able to unintentionally make the other code slightly more efficient while my original was lacking, however I don't think is the right answer as I tried to keep the code very similar and didn't have too much trouble to do so. Another idea as to why C lost out might be attributed to calculating, I used Primeregb which only breaks when it finds out it's not a prime, it does not use the square root trick. Maybe C++ is much more efficient at using the square-root in calculations and that is why when used it shines. Also the number of primes I reached were pretty low compared to other student's so C++ also didn't get a chance to show what it can do in longer term calculations.
 +
 +{{:notes:comporg:projects:pnc2plots.png?|}}
notes/comporg/projects/pnc2.1518053845.txt.gz · Last modified: 2018/02/08 01:37 by kbeykirc