A Performance Analysis of Java and C

– Java and C are two popular specification languages used to define systems of all sizes and forms. In this paper, we present a performance comparison of various algorithms written in C and Java on Windows NT and Linux environments. The metrics considered in the analysis include speed of execution, memory usage, Java vs. C overheads and other special features that characterize the two languages. We investigated both languages based on how their design choices influence their performance rather than by semantics and programming paradigms. The algorithms for the analysis were chosen to represent those commonly used in embedded systems (such as FIRs) as well as more exotic ones like the MD5 cipher. Our results show that, in general, C produced better run time performance than Java across both Linux and Windows NT platforms.