This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// by Benjamin 'BeRo' Rosseaux | |
// licensed under CC0 1.0 Universal (CC0 1.0) Public Domain Dedication ( http://creativecommons.org/publicdomain/zero/1.0/ ) | |
void clipLineInHomogeneousCoordinates(inout vec4 pP0, inout vec4 pP1){ | |
vec3 lWC0P = pP0.www + pP0.xyz; | |
vec3 lWC0S = pP0.www - pP0.xyz; | |
vec3 lWC1P = pP1.www + pP1.xyz; | |
vec3 lWC1S = pP1.www - pP1.xyz; | |
vec3 lTTP = lWC0P / (lWC0P - lWC1P); | |
vec3 lTTS = lWC0S / (lWC0S - lWC1S); | |
#ifdef NO_BOOLEAN_OPERATIONS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;====================================================================== | |
; With dot per directive | |
;====================================================================== | |
.macro CopyData(Src, Dest, Count, UseRep){ | |
.local Temp | |
cld | |
mov esi, Src | |
mov edi, Dest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
** Multi line comment | |
*/ | |
// Single line commit | |
PE_SCN_CNT_CODE = 0x00000020 | |
PE_SCN_CNT_INITIALIZED_DATA = 0x00000040 | |
PE_SCN_CNT_UNINITIALIZED_DATA = 0x00000080 | |
PE_SCN_MEM_EXECUTE = 0x20000000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Applied on http://www.gutenberg.org/files/3200/old/mtent12.txt at a whole- | |
file-loaded-into-the-RAM-base on a desktop computer with a Intel Xeon | |
E3-1245v2 CPU and 16GB (2x8GB) DDR3-1600 unbuffered ECC RAM under Windows | |
8.1 | |
Time | Match count | |
============================================================================== | |
FLRE: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
============================================================================== | |
FLRE: | |
/Twain/ : 8.24 ms | 2388 | |
/(?i)Twain/ : 8.48 ms | 2657 | |
/[a-z]shing/ : 8.67 ms | 1877 | |
/Huck[a-zA-Z]+|Saw[a-zA-Z]+/ : 12.02 ms | 396 | |
/\b\w+nn\b/ : 35.54 ms | 359 | |
/[a-q][^u-z]{13}x/ : 110.64 ms | 4929 | |
/Tom|Sawyer|Huckleberry|Finn/ : 20.05 ms | 3015 | |
/(?i)Tom|Sawyer|Huckleberry|Finn/ : 29.85 ms | 4820 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
program biginttest; | |
{$ifdef fpc} | |
{$mode delphi} | |
{$endif} | |
{$APPTYPE CONSOLE} | |
(****************************************************************************** | |
* zlib license * | |
*============================================================================* | |
* * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(* | |
** | |
** Copyright (c) 2002-2015 Lee Salzman | |
** Copyright (c) 2013-2015 Benjamin 'BeRo' Rosseaux (Pascal port and IPv6) | |
** | |
** Permission is hereby granted, free of charge, to any person obtaining a | |
** copy of this software and associated documentation files (the "Software"), | |
** to deal in the Software without restriction, including without limitation | |
** the rights to use, copy, modify, merge, publish, distribute, sublicense, | |
** and/or sell copies of the Software, and to permit persons to whom the |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright (C) 2015 by Benjamin 'BeRo' Rosseaux | |
// licensed under CC0 1.0 Universal (CC0 1.0) Public Domain Dedication ( http://creativecommons.org/publicdomain/zero/1.0/ ) | |
// Warning: Untested, written from scratch directly as a GitHubGist. It should only show the base idea behind it. | |
#define RingBufferInt int | |
#define RingBufferAtomicInt int | |
typedef int TRingBufferItem; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
============================================== | |
New FLRE benchmark values of 05. Feburary 2015 | |
============================================== | |
In summary: | |
Delphi's 32-bit x86 code generator is better than FreePascal's 32-bit x86 code generator, | |
and FreePascal's 64-bit x86 code generator is better than Delphi's 64-bit x86 code | |
generator. The x86 inline assembler routines falls not so significant yet, i.e. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
program ClassIDTest1; | |
{$mode delphi} | |
{$apptype console} | |
{$m+} | |
uses Windows,SysUtils,Classes; | |
type PSupraComponentClassNameID=^TSupraComponentClassNameID; | |
TSupraComponentClassNameID=record | |
Name:shortstring; |
OlderNewer