Skip to content

Commit 6ac344e

Browse files
committed
Clean up of docs
1 parent 2b19b17 commit 6ac344e

File tree

1 file changed

+14
-13
lines changed

1 file changed

+14
-13
lines changed

README.md

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,28 +9,29 @@ Scala macros that generate codecs for case classes, standard types and collectio
99
to get maximum performance of JSON parsing and serialization.
1010

1111
[Latest results of benchmarks](http://plokhotnyuk.github.io/jsoniter-scala/) which compare parsing and serialization
12-
performance of Jsoniter Scala vs. Jackson, Circe and Play-JSON libraries using JDK 8 & JDK 9 on the following
13-
environment: Intel® Core™ i7-7700HQ CPU @ 2.8GHz (max 3.8GHz), RAM 16Gb DDR4-2400, Ubuntu 16.04,
14-
Linux notebook 4.13.0-32-generic, Oracle JDK 64-bit (builds 1.8.0_161-b12 and 9.0.4+11 accordingly)
12+
performance of Jsoniter Scala vs. Jackson, Circe and Play-JSON libraries using JDK 8 & 9 on the following environment:
13+
Intel® Core™ i7-7700HQ CPU @ 2.8GHz (max 3.8GHz), RAM 16Gb DDR4-2400, Ubuntu 16.04, Linux notebook 4.13.0-32-generic,
14+
Oracle JDK 64-bit (builds 1.8.0_161-b12 and 9.0.4+11 accordingly)
1515

1616
## Goals
1717

1818
Initially this library was developed for requirements of real-time bidding in ad-tech and goals are simple:
1919
- do parsing and serialization of JSON directly from UTF-8 bytes to your case classes and Scala collections and back but
20-
do it crazily fast w/o reflection, intermediate trees, strings or events, w/ minimum allocations and copying
20+
do it crazily fast without runtime-reflection, intermediate AST-trees, strings or events, with minimum allocations and
21+
copying
2122
- do validation of UTF-8 encoding, JSON format and mapped values efficiently with clear reporting, do not replace
2223
illegally encoded characters of string values by placeholder characters
2324
- define in _compile-time_ classes that will be instantiated during parsing to minimize probability of runtime issues,
2425
generated sources can be inspected to prove that there are no security vulnerabilities during parsing
2526

26-
It targets JDK 8+ w/o any platform restrictions.
27+
It targets JDK 8+ without any platform restrictions.
2728

2829
Support of Scala.js and Scala Native is not a goal for the moment.
2930

3031
## Features and limitations
3132
- JSON parsing from `Array[Byte]` or `java.io.InputStream`
3233
- JSON serialization to `Array[Byte]` or `java.io.OutputStream`
33-
- Parsing of streaming JSON values and JSON arrays from `java.io.InputStream` w/o need of holding all parsed values
34+
- Parsing of streaming JSON values and JSON arrays from `java.io.InputStream` without need of holding all parsed values
3435
in the memory
3536
- Support reading part of `Array[Byte]` by specifying of position and limit of reading from/to
3637
- Support writing to pre-allocated `Array[Byte]` by specifying of position of writing from
@@ -45,7 +46,7 @@ Support of Scala.js and Scala Native is not a goal for the moment.
4546
`java.util.UUID`, `java.time.*`, and value classes for any of them
4647
- Support of ADTs with sealed trait or sealed abstract class base and case classes or case objects as leaf classes,
4748
using discriminator field with string type of value
48-
- Implicitly resolvable codecs for values and key codecs for map keys
49+
- Implicitly resolvable values codecs for JSON values and key codecs for JSON object keys that are mapped to maps
4950
- Support only acyclic graphs of class instances
5051
- Fields with default values that defined in the constructor are optional, other fields are required (no special
5152
annotation required)
@@ -60,7 +61,7 @@ Support of Scala.js and Scala Native is not a goal for the moment.
6061
- No dependencies on extra libraries excluding Scala's `scala-library` and `scala-reflect`
6162

6263
There are number of configurable options that can be set in compile-time:
63-
- Ability to read/write number of containers from/to string values
64+
- Ability to read/write numbers of containers from/to string values
6465
- Skipping of unexpected fields or throwing of parse exceptions
6566
- Mapping function for names between case classes and JSON, including predefined functions which enforce
6667
snake_case, kebab-case or camelCase names for all fields
@@ -70,7 +71,7 @@ There are number of configurable options that can be set in compile-time:
7071
List of options that change parsing and serialization in runtime:
7172
- Serialization of strings with escaped Unicode characters to be ASCII compatible
7273
- Indenting of output and its step
73-
- Throwing of stackless parsing exceptions to greatly reduce impact on performance
74+
- Throwing of stack-less parsing exceptions to greatly reduce impact on performance
7475
- Turning off hex dumping of affected by error part of an internal byte buffer to reduce impact on performance
7576
- Preferred size of internal buffers when parsing from `InputStream` or serializing to `OutputStream`
7677

@@ -167,20 +168,20 @@ sbt clean 'benchmark/jmh:run -prof jmh.extras.JFR -wi 10 -i 50 .*GoogleMapsAPI.*
167168
On Linux the perf profiler can be used to see CPU event statistics normalized per ops:
168169

169170
```sh
170-
sbt -no-colors clean 'benchmark/jmh:run -prof perfnorm .*TwitterAPI.*' >twitter_api_perfnorm.txt
171+
sbt clean 'benchmark/jmh:run -prof perfnorm .*TwitterAPI.*'
171172
```
172173

173174
Following command can be used to profile and print assembly code of hottest methods, but it requires [setup of an
174175
additional library to make PrintAssembly feature enabled](http://psy-lob-saw.blogspot.com/2013/01/java-print-assembly.html):
175176

176177
```sh
177-
sbt -no-colors clean 'benchmark/jmh:run -prof perfasm -wi 10 -i 10 .*Adt.*readJsoniter.*' >read_adt_perfasm.txt
178+
sbt clean 'benchmark/jmh:run -prof perfasm -wi 10 -i 10 .*Adt.*readJsoniter.*'
178179
```
179180

180-
To see throughput with allocation rate of generated codecs run benchmarks with GC profiler using following command:
181+
To see throughput with allocation rate of generated codecs run benchmarks with GC profiler using the following command:
181182

182183
```sh
183-
sbt -no-colors clean 'benchmark/jmh:run -prof gc .*Benchmark.*' >gc.txt
184+
sbt clean 'benchmark/jmh:run -prof gc .*Benchmark.*'
184185
```
185186

186187
Results of benchmark can be stored in different formats: *.csv, *.json, etc. All supported formats can be listed by:

0 commit comments

Comments
 (0)