{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

HW 8 Challenge

HW 8 Challenge - ludet2 Reason for disparity in performance...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Name: Kranthi Kode HW 8 Challenge I implemented ludet() and ludet2() functions, with operator overloading and by indexing the array respectively. The following plots show time in milliseconds per one function call vs matrix size. ludet (Operator Overloading) vs ludet2 (Array Indexing) 0 500 1000 1500 2000 2500 1 65 129 193 257 321 385 449 n time (ms) ludet()
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ludet2() Reason for disparity in performance: Every time operator overloading is used in ludet() function, it is analogous to function call and results in context switching which could be a huge overhead where as, using array index as in ludet2() is straightforward and doesn’t involve any such middle step....
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online