Skip to content

Commit fc8a460

Browse files
authored
Better documentation of default_batch_size (simdjson#1056)
* Better documentation of default_batch_size * Retweaking.
1 parent d2bea0c commit fc8a460

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

CONTRIBUTING.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,12 @@ Pull requests are always invited. However, we ask that you follow these guidelin
7171

7272
If the benefits of your proposed code remain unclear, we may choose to discard your code: that is not an insult, we frequently discard our own code. We may also consider various alternatives and choose another path. Again, that is not an insult or a sign that you have wasted your time.
7373

74+
Style
75+
-----
76+
77+
Our formatting style is inspired by the LLVM style.
78+
The simdjson library is written using the snake case: when a variable or a function is a phrase, each space is replaced by an underscore character, and the first letter of each word written in lowercase. Compile-time constants are written entirely in uppercase with the same underscore convention.
79+
7480
Code of Conduct
7581
---------------
7682

include/simdjson/dom/parser.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ class parser {
196196
* @param batch_size The batch size to use. MUST be larger than the largest document. The sweet
197197
* spot is cache-related: small enough to fit in cache, yet big enough to
198198
* parse as many documents as possible in one tight loop.
199-
* Defaults to 10MB, which has been a reasonable sweet spot in our tests.
199+
* Defaults to 1MB (as simdjson::dom::DEFAULT_BATCH_SIZE), which has been a reasonable sweet spot in our tests.
200200
* @return The stream, or an error. An empty input will yield 0 documents rather than an EMPTY error. Errors:
201201
* - IO_ERROR if there was an error opening or reading the file.
202202
* - MEMALLOC if the parser does not have enough capacity and memory allocation fails.

0 commit comments

Comments
 (0)