Are Java algorithms implemented in C or in java?

I know that the python implementation for timsort is implemented in C to improve performance. Does this also apply to java implementation or all java algorithms implemented in java?

+5
source share
5 answers

Most of the standard library is usually implemented in Java. Nevertheless, many of the functionality of the OS or platform must be implemented in the "native" code, so a good percentage is also usually written in C and / or C ++. Of course, this depends a little on the specific implementation of the JVM.

Typical functionality implemented in languages ​​other than Java includes streams, network I / O, file I / O, and low-level APIs. Please note that these are all rather small, low-level specific functions - all the more abstract / general algorithms are ideal for implementation in Java, and therefore they are usually.

+6
source

Most of the Java library is implemented in Java, including a sorting algorithm.

+4
source

: JVM . API stadard API java. - .

+1

, Java. .

+1

If you look at the sources java.util.Arrays.sort(), you will see that the sorting algorithm is implemented in Java. However, this does not necessarily imply that all other algorithms are either.

+1
source

All Articles