A just for fun benchmark test for C, Go, Java, Javascript, PHP, Python and Swift

You may also like...

3 Responses

  1. Toni says:

    fast running but not beauty. beauty structure make the other people easy to follow-up. Also how about the c#?

  2. Mugen says:

    golang by default “compile with optimizations”, but swift not. And dont use “go bench”

    it is more correct
    swiftc -O benchmark_test.swift
    go build benchmark_test.go

    and more (not serious)
    swiftc -Ounchecked benchmark_test.swift

    swift -O
    real 0m0.166s
    user 0m0.164s
    sys 0m0.000s

    swift -Ounchecked
    real 0m0.080s
    user 0m0.076s
    sys 0m0.000s

    real 0m0.133s
    user 0m0.124s
    sys 0m0.004s

Leave a Reply

Your email address will not be published. Required fields are marked *