Update go-vs-java.md to explain virtual threads

pull/8316/head
Rick Hanton 2 months ago committed by GitHub
parent 8b61bbfcbb
commit f82dcf3398
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 6
      src/data/guides/go-vs-java.md

@ -31,10 +31,10 @@ In this guide, I'll walk you through the key features of both Go and Java, inclu
The table below summarizes the key features of Go and Java:
| **Feature** | **Go** | **Java** |
| ------------------------- | ------------------------------------------------------------ | --------------------------------------------------------------- |
| ------------------------- | ------------------------------------------------------------ | --------------------------------------------------------------------------------------------- |
| **Type** | Compiled language to native code | Compiled to bytecode, runs on the JVM |
| **Concurrency Model** | Goroutines (lightweight threads, managed by Go runtime) | Threads (OS-level, managed by JVM) |
| **Memory Management** | Garbage collection, with manual memory management options | Automatic garbage collection (JVM) |
| **Concurrency Model** | Goroutines (lightweight threads, managed by Go runtime) | Threads (OS-level, managed by JVM) OR Virtual Threads (> JRE 21, lightweight, managed by JVM) |
| **Memory Management** | Garbage collection, with manual memory management options | Automatic garbage collection (JVM), default depends on JVM, 4 GC options |
| **Syntax** | Simple, concise, inspired by C | Verbose, object oriented language |
| **Performance** | High due to direct compilation to machine code | Good, but can be slower due to the JVM layer |
| **Cross-Platform** | Compiles to native binaries, runs on multiple platforms | JVM provides cross-platform compatibility |

Loading…
Cancel
Save