10 ms·
Ask HN: What's the fastest programming language with a large standard library?
An example of a language that does not fit the bill: rust
- aristofun 3y agoNodejs is extremely fast in networking (web, api, gateway) kinds of scenarios both dev-time (which is more important) and runtime wise
- satvikpendem 3y agoNode doesn't have a large standard library so it doesn't answer the question.
- deleted 3y ago[deleted]
- sgt 3y agoJava
- aristofun 3y ago20 years ago yes. Today it is a terrible monster that you use because of the lack of alternatives, not because it is fast or comfortable to use.
- jryan49 3y agoI disagree Java 21 is really nice. Lots of modern features, tons of rock solid, battle tested open source libraries. Amazing tooling.
- aristofun 3y ago> Amazing tooling. Apparently you're comparing to java 20 years ago. Not to modern dev friendly ecosystems.
- jryan49 3y agoI've used vscode with typescript and python, but I found the amount of detail and coverage the inspections intellij has are better. The profilers that Java have are also the best I've seen. The profilers can show you crazy details on SQL queries being run, that get traced all the way through to the http endpoints (https://www.ej-technologies.com/resources/jprofiler/help/doc/images/ui/probe_hot_spots_expanded-315e3810a2ed243a6a8be8f9a33d6f9b.png https://www.ej-technologies.com/resources/jprofiler/help/doc...).
- sgt 3y agoBeen a Java developer for many years but I've never tried JProfiler. Is it free, no big catches?
- jryan49 3y agoNo the 3rd party profilers aren't free. But they have free trials. Java flight recorder is free and has a lot of the features of the paid ones (like the SQL tab) https://blogs.oracle.com/weblogicserver/post/jdbc-in-java-mission-control https://blogs.oracle.com/weblogicserver/post/jdbc-in-java-mi...
- sgt 3y agoJava is pretty fast though, according to benchmarks. Your point regarding comfortable to use ... yeah, fair enough to some degree.
- zicd 3y agoHolyC
- BillyTheMage 3y agoCommon Lisp has quite a lot compared to most languages, and in most cases is just as performant. Of course C and Rust are always going to outperform in edge cases simply because of their proximity to hardware. I don't remember the exact quote, but it goes something like "most [languages?] are a buggy implementation of half of Common Lisp"
- mikewarot 3y agoI always thought of Turbo Pascal/Delphi/Free Pascal as a fairly complete system. Static typing gets in the way at times, so you won't see TensorFlow in Pascal, but the TUI/GUI that came with it made it suitable for building almost anything, with no added pieces. The compilation process itself is one of the fastest around. Libraries are "units" and separately compiled. You can have GUI executables that weigh in at < 500k if you turn off debugging.
- Encyclopediadev 3y agoIs it fast at runtime?
- mikewarot 3y agoOhhhhh yeah
- colesantiago 3y agogo
- lgkk 3y agothis. go has the best perf:dx:deployment ratio.
- deleted 3y ago[deleted]
- Guid_NewGuid 3y agoC#/.NET in my opinion. Extremely extensive and high quality standard library and it keeps getting faster every release. Though it's kind of a difficult question to answer, what do you need the standard library to actually do?
- neonsunset 3y agoAgree, no other standard library has comparable degree of code vectorization either.
- idontwantthis 3y agoWhat does that mean?
- neonsunset 3y ago.NET's standard library is very heavily vectorized, vectorization is considered in all scenarios where it is applicable, the compiler will also apply it to copies of known length and string comparisons fully eliding and unrolling Memmove and SequenceEqual calls. The gives languages that run on top of .NET massive performance advantage in a variety of scenarios versus any other language - C++ and Rust stdlibs are far more conservatively vectorized because neither language has stable SIMD vector API and even then out of modularity constraints a lot of routines have to either rely on autovectorization which is fragile or manually vectorized with intrisics for each individual platform. A short non-exhaustive list of examples is - Shared SIMD helper for Aho-Corasick, Rabin-Karp and other text search algorithms https://github.com/dotnet/runtime/blob/main/src/libraries/System.Private.CoreLib/src/System/SearchValues/Strings/Helpers/StringSearchValuesHelper.cs https://github.com/dotnet/runtime/blob/main/src/libraries/Sy... - Bloom filter https://github.com/dotnet/runtime/blob/main/src/libraries/System.Private.CoreLib/src/System/SearchValues/ProbabilisticMap.cs https://github.com/dotnet/runtime/blob/main/src/libraries/Sy... - Base64 encoding and decoding https://github.com/dotnet/runtime/blob/main/src/libraries/System.Private.CoreLib/src/System/Buffers/Text/Base64Encoder.cs https://github.com/dotnet/runtime/blob/main/src/libraries/Sy... - Element search (memchr and the like) https://github.com/dotnet/runtime/blob/main/src/libraries/System.Private.CoreLib/src/System/SpanHelpers.T.cs#L1496 https://github.com/dotnet/runtime/blob/main/src/libraries/Sy... - UTF-8 transcoding https://github.com/dotnet/runtime/blob/main/src/libraries/System.Private.CoreLib/src/System/Text/Unicode/Utf8Utility.Transcoding.cs#L838 https://github.com/dotnet/runtime/blob/main/src/libraries/Sy... The above are examples of 1% code that ends up used by 99% of other codebase in one way or another. Regex engine, JSON serialization and parsing, substringing and etc. all use these.
- kingkongjaffa 3y agoWithout providing a defn of “fast” and within what domain, this is a meaningless post.
- Raminj95 3y agoWhy is no one mentioning c++? Is that not the obvious answer here ?
- cpach 3y agoDoes it have a large standard library?
- farseer 3y agoIf you go for fastest then C++ with its own standard library plus add a few third party ones will get most stuff done. Look here: https://en.cppreference.com/w/cpp/links/libs https://en.cppreference.com/w/cpp/links/libs Pick header only libraries if you are concerned about portability. Now C++ is a pain in the ass to work with, and the world has moved on to better more convenient things. Do explore modern C# and Go for better developer productivity.