article thumbnail

Framework Benchmarks Round 22

TechEmpower

We’re pleased to announce Round 22 of the TechEmpower Framework Benchmarks! The TechEmpower Framework Benchmarks project celebrates its 10th anniversary, boasting significant engagement with over 7,000 stars on GitHub and more than 7,100 Pull Requests. Follow us on Twitter for regular updates.

Framework 409
article thumbnail

Mangling JSON numbers

TechEmpower

Theoretically we can send it from a Java server to a JavaScript client via JSON and both sides see exactly the same number. To convince ourselves that this number is safe, we examine various representations of this number in Java and JavaScript: // In Java long x = 1L. It passes our verifyLongFitsInDouble check.

Insiders

Sign Up for our Newsletter

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

article thumbnail

Everything about Java 8

TechEmpower

The following post is a comprehensive summary of the developer-facing changes coming in Java 8. At the time of this writing, Java 8 development is still very much in progress. It had the best support for the Java 8 language features at the time I went looking. Language features and APIs may still change.

Java 560
article thumbnail

Efficient multiple-stream concatenation in Java

TechEmpower

With three streams we could write Stream.concat(Stream.concat(a, b), c). Let me share a few trends that I've noticed when dealing with streams and stream concatenation in general, having written a fair amount of code in Java 8 by now. Stream a = Stream. of ( "one" , "two" ); Stream b = Stream. concat ( a , b ); out. forEach ( System.

Java 200
article thumbnail

Framework Benchmarks Round 16

TechEmpower

Now in its fifth year, the TechEmpower Framework Benchmarks project has another official round of results available. See [link] pic.twitter.com/Od1nuq0UQV — TechEmpower Framework Benchmarks (@TFBenchmarks) May 17, 2018. Mostly so that we can use the opportunity to write a blog entry and generate hype!) Don't don't @ us.

Framework 377
article thumbnail

EnumSet and EnumMap

TechEmpower

from Java's standard libraries. Historically, Enum{Set,Map} were recommended as a matter of safety, taking better advantage of Java's type system than the alternatives. Effective Java goes into detail about this use case for Enum{Set,Map} and enum types in general. This article discusses java.util.EnumSet. and java.util.EnumMap.

Java 330
article thumbnail

One million HTTP RPS without load balancing is easy

TechEmpower

But check out what they can do: techempower@lg01:~$ wrk -d 30 -c 256 -t 40 [link]. 40 threads and 256 connections Thread Stats Avg Stdev Max +/- Stdev Latency 247.05us 3.52ms 624.37ms 99.90% Req/Sec 27.89k 6.24k 50.22k 71.15% 31173283 requests in 29.99s, 3.83GB read Socket errors: connect 0, read 0, write 0, timeout 9 Requests/sec: 1039305.27

EC2 514