Index: src/benchmark/ctxswitch/JavaThread.java
===================================================================
--- src/benchmark/ctxswitch/JavaThread.java	(revision 2b716ec28ad95c2132e5e2ff74fd1bb6fb81fd9d)
+++ src/benchmark/ctxswitch/JavaThread.java	(revision 2b716ec28ad95c2132e5e2ff74fd1bb6fb81fd9d)
@@ -0,0 +1,11 @@
+public class JavaThread {
+	public static void main(String[] args) {
+		int NoOfTimes = 5000000;
+		long start = System.nanoTime();
+		for(int i = 1; i <= NoOfTimes; i += 1) {
+			Thread.yield();
+		}
+		long end = System.nanoTime();
+		System.out.println( (end - start) / NoOfTimes);
+	}
+}
Index: src/benchmark/ctxswitch/goroutine.go
===================================================================
--- src/benchmark/ctxswitch/goroutine.go	(revision 2b716ec28ad95c2132e5e2ff74fd1bb6fb81fd9d)
+++ src/benchmark/ctxswitch/goroutine.go	(revision 2b716ec28ad95c2132e5e2ff74fd1bb6fb81fd9d)
@@ -0,0 +1,33 @@
+package main
+
+import (
+    "fmt"
+    "runtime"
+    "time"
+)
+
+//=======================================
+// time context switch
+//=======================================
+
+var shake chan bool = make( chan bool )
+
+func ContextSwitch(N int) {
+	start := time.Now()
+	for i := 1; i <= N; i += 1 {
+		runtime.Gosched()
+	}
+	end := time.Now()
+	fmt.Printf("%d\n", end.Sub(start) / time.Duration(N))
+	shake <- true   // indicate completion
+}
+
+//=======================================
+// benchmark driver
+//=======================================
+
+func main() {
+	const NoOfTimes = 10000000
+	go ContextSwitch( NoOfTimes )		// context switch
+	<- shake
+}
