Skip to content

Instantly share code, notes, and snippets.

View synopse's full-sized avatar
🏠
Working from home

ab synopse

🏠
Working from home
View GitHub Profile
{
"swagger": "2.0",
"info": {
"description": "Generated by Project14ServerHttpWrapper (2020-01-02 18:13:12) using mORMot 1.18.5518 at 2020-01-02 18:14:13",
"title": "root API"
},
"host": "127.0.0.1:8888",
"basePath": "/root",
type
ToolsThread = class(TThread)
public
tab : TRawUTF8DynArray;
constructor Create; reintroduce;
procedure Execute; override;
procedure QuickSort(iLo, iHi: Integer);
end;
procedure ToolsThread.QuickSort(iLo, iHi: Integer);
@synopse
synopse / gist:53601e7bc43d26ceda4c63a4e771d270
Last active March 24, 2020 19:48
Synopse mORMot framework 1.18.5894 Database Benchmark
Running tests using Synopse mORMot framework 1.18.5894, compiled with Free Pascal 3.1.1 64 bit, against SQLite 3.31.0, on Ubuntu 18.04.4 LTS - Linux 5.3.0-42-generic, at 2020-03-24 20:41:32.
Insertion speed (rows/second)
Direct Batch Trans Batch Trans
Sqlite file full 493 16855 39053 131919
Sqlite file off 7131 113695 41897 145142
Sqlite file off exc 14263 132897 42718 145751
Sqlite file off exc aes 11009 119731 43836 132890
Sqlite in memory 23748 139762 43884 145234
@synopse
synopse / orm.html
Created March 24, 2020 19:44
mORMot HTML ORM Benchmarks
<html><body>
<p>Running tests using Synopse mORMot framework 1.18.5894, compiled with Free Pascal 3.1.1 64 bit, against SQLite 3.31.0, on Ubuntu 18.04.4 LTS - Linux 5.3.0-42-generic, at 2020-03-24 20:41:32.</p><h1>Insertion speed</h1>
<p><table><tr align=center><td>&nbsp;</td><td><b>Direct</b></td><td><b>Batch</b></td><td><b>Trans</b></td><td><b>Batch Trans</b></td></tr>
<tr align=center><td><b>Sqlite file full</b></td><td>493</td><td>16855</td><td>39053</td><td>131919</td></tr>
<tr align=center><td><b>Sqlite file off</b></td><td>7131</td><td>113695</td><td>41897</td><td>145142</td></tr>
<tr align=center><td><b>Sqlite file off exc</b></td><td>14263</td><td>132897</td><td>42718</td><td>145751</td></tr>
<tr align=center><td><b>Sqlite file off exc aes</b></td><td>11009</td><td>119731</td><td>43836</td><td>132890</td></tr>
<tr align=center><td><b>Sqlite in memory</b></td><td>23748</td><td>139762</td><td>43884</td><td>145234</td></tr>
<tr align=center><td><b>In memory static</b></td><td>94344</td><td>257360</td><
@synopse
synopse / gist:d2be3106e031773eab833bea34f5bf1e
Created March 24, 2020 20:04
Synopse mORMot framework 1.18.5895 ORM Benchmark
Running tests using Synopse mORMot framework 1.18.5895, compiled with Free Pascal 3.1.1 64 bit, against SQLite 3.31.0, on Ubuntu 18.04.4 LTS - Linux 5.3.0-42-generic, at 2020-03-24 21:02:31.
Insertion speed (rows/second)
Direct Batch Trans Batch Trans
Sqlite file full 507 18308 50041 132703
Sqlite file off 7796 112989 55336 146322
Sqlite file off exc 20705 134321 55041 143299
Sqlite file off exc aes 13779 120186 55219 134134
@synopse
synopse / gist:cead42e18fd38d4ab014b9755582069c
Created April 23, 2020 10:08
mORMot 1.18.5960 on FPC 3.2 with HeapTRC
Synopse mORMot Framework Automated tests
------------------------------------------
1. Synopse libraries
1.1. Low level common:
- System copy record: 162 assertions passed 28us
- TRawUTF8List: 190,172 assertions passed 290.02ms
{$ifdef CPUX64}
function bswap32(a: cardinal): cardinal;
{$ifdef FPC}nostackframe; assembler; asm {$else} asm .noframe {$endif FPC}
mov eax, a
bswap eax
end;
function bswap64(const a: QWord): QWord; {$ifdef FPC}nostackframe; assembler; asm {$else}
asm .noframe // rcx=a (Linux: rdi)
{$endif FPC}
@synopse
synopse / gist:f98f2cfa1296eae5e90aa4a18e24d468
Created June 10, 2020 20:43
__ANSISTR_DECR_REF disassembly
MORMOT.CORE.RTTI_$$__ANSISTR_DECR_REF$POINTER LABEL NEAR
mov rax, qword ptr [rdi] ; 0000 _ 48: 8B. 07
xor edx, edx ; 0003 _ 31. D2
test rax, rax ; 0005 _ 48: 85. C0
jz ?_0002 ; 0008 _ 74, 13
mov qword ptr [rdi], rdx ; 000A _ 48: 89. 17
mov rdi, rax ; 000D _ 48: 89. C7
cmp qword ptr [rax-10H], rdx ; 0010 _ 48: 39. 50, F0
jl ?_0002 ; 0014 _ 7C, 07
lock dec qword ptr [rax-10H] ; 0016 _ F0 48: FF. 48, F0
@synopse
synopse / gist:90ada32d9931dde88f44be5b1e76b720
Last active June 15, 2020 14:09
static/x86_64-linux folder
ab@devlaptop:~$ cd dev/lib/static/x86_64-linux/
ab@devlaptop:~/dev/lib/static/x86_64-linux$ ll
total 4832
drwxr--r-- 2 ab ab 4096 Jun 10 15:41 ./
drwxr--r-- 15 ab ab 4096 Jun 15 10:21 ../
-rw-r--r-- 1 ab ab 15328 Oct 8 2019 crc32c64.o
-rw-r--r-- 1 ab ab 98416 Oct 8 2019 ecclin64O2.o
-rw-r--r-- 1 ab ab 5272 Oct 8 2019 entropy_common.o
-rw-r--r-- 1 ab ab 16840 Oct 8 2019 fse_compress.o
-rw-r--r-- 1 ab ab 7736 Oct 8 2019 fse_decompress.o
@synopse
synopse / gist:005068d5e4c88c55f48461dae1c3da96
Created January 10, 2021 10:23
mORMot 1.18.6202 tests on Linux x86_64
Hint: (lazarus) [TMainIDE.DoRunProjectWithoutDebug] ExeCmdLine=""/home/ab/dev/lib/SQLite3/fpc/bin/x86_64-linux/TestSQL3""
Synopse mORMot Framework Automated tests
------------------------------------------
1. Synopse libraries
1.1. Low level common:
- System copy record: 162 assertions passed 26us