You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: entries/abouchez/README.md
+7-5Lines changed: 7 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,12 +1,14 @@
1
-
# mORMot version of The One Billion Row Challenge by Arnaud Bouchez
1
+
# Arnaud Bouchez
2
+
3
+
**mORMot entry to The One Billion Row Challenge in Object Pascal.**
2
4
3
5
## mORMot 2 is Required
4
6
5
7
This entry requires the **mORMot 2** package to compile.
6
8
7
9
Download it from https://github.com/synopse/mORMot2
8
10
9
-
It is better to fork the current state of the mORMot 2 repository, or get the latest release.
11
+
It is better to fork the current state of the *mORMot 2* repository, or get the latest release.
10
12
11
13
## Licence Terms
12
14
@@ -29,15 +31,15 @@ Here are the main ideas behind this implementation proposal:
29
31
- Parse temperatures with a dedicated code (expects single decimal input values);
30
32
- No memory allocation (e.g. no transient `string` or `TBytes`) nor any syscall is done during the parsing process to reduce contention and ensure the process is only CPU-bound and RAM-bound (we checked this with `strace` on Linux);
31
33
- Pascal code was tuned to generate the best possible asm output on FPC x86_64 (which is our target);
32
-
- Some dedicated x86_64 asm has been written to replace mORMot `crc32c` and `MemCmp` general-purpose functions and gain a last few percents (nice to have);
34
+
- Some dedicated x86_64 asm has been written to replace *mORMot*`crc32c` and `MemCmp` general-purpose functions and gain a last few percents (nice to have);
33
35
- Can optionally output timing statistics and hash value on the console to debug and refine settings (with the `-v` command line switch);
34
36
- Can optionally set each thread affinity to a single core (with the `-a` command line switch).
35
37
36
38
The "64 bytes cache line" trick is quite unique among all implementations of the "1brc" I have seen in any language - and it does make a noticeable difference in performance. The L1 cache is well known to be the main bottleneck for any efficient in-memory process. We are very lucky the station names are just big enough to fill no more than 64 bytes, with min/max values reduced as 16-bit smallint - resulting in temperature range of -3276.7..+3276.8 which seems fair on our planet according to the IPCC. ;)
37
39
38
40
## Usage
39
41
40
-
If you execute the `abouchez` executable without any parameter, it will give you some hints about its usage (using mORMot `TCommandLine` abilities):
42
+
If you execute the `abouchez` executable without any parameter, it will give you some hints about its usage (using *mORMot*`TCommandLine` abilities):
There is a "pure mORMot" name lookup version available if you undefine the `CUSTOMHASH` conditional, which is around 40% slower, because it needs to copy the name into the stack before using `TDynArrayHashed`, and has a little more overhead.
144
+
There is a "*pure mORMot*" name lookup version available if you undefine the `CUSTOMHASH` conditional, which is around 40% slower, because it needs to copy the name into the stack before using `TDynArrayHashed`, and has a little more overhead.
0 commit comments