Hacker News new | past | comments | ask | show | jobs | submit login

> C and C++ compilers can produce faster execution than Go or JVMs as they support SIMD vectorization e.g. SSE/AVX. For CPU-bound workloads you can get more than 2x speed up.

This is an implementation issue.

Nothing prevents a compiler vendor to offer the same capabilities to their language compilers.

Vectorization is not part of ANSI/ISO C or ANSI/ISO C++.

For the time being, do you want vectorization in Go? Write a tiny assembler routine. Done.

JVM? They are working on making it part of the reference JVM http://openjdk.java.net/projects/sumatra/.

.NET? While Microsoft does not offer anything, Mono has SIMD support since 2008, http://tirania.org/blog/archive/2008/Nov-03.html




It's an implementation issue that matters if you're writing a system that needs to offer high performance today.

Regarding writing assembly - that's fine, you could also write a routine in C and call it. The thrust of my comment is that it is untrue to argue that native Go and Java match the performance of C/C++. They don't. They might in the future.


In the majority of cases they do. For a few minor cases where they don't (but they are close to) you can drop to C or assembly.


sumatra is for parallelizing mainly on GPU, not for SIMD - current C/C++ compilers neither do that. Java has SIMD support for quite a long while now, probably since Java 6 or even earlier and generally C-like Java code using raw arrays and primitives is as-fast-as-C these days. I'd be more afraid of lack of true value types in Java. This one thing makes C still a better choice for high performance stuff.


> I'd be more afraid of lack of true value types in Java

The IBM J9 VM already has them.

http://duimovich.blogspot.ca/2012/11/packed-objects-in-java....

http://www.slideshare.net/mmitran/ibm-java-packed-objects-mm...




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: