i7-4510U @ 2.00 GHz
Entity Count | Iterations | Probability | EntityPlus | EntityX |
-----------------------------------------------------------------+
1 000 | 1 000 000 | 1 in 3 | 1484 ms | 20959 ms |
10 000 | 1 000 000 | 1 in 3 | 15916 ms | 208156 ms |
30 000 | 100 000 | 1 in 3 | 5092 ms | 63012 ms |
100 000 | 100 000 | 1 in 5 | 13946 ms | 133365 ms |
10 000 | 1 000 000 | 1 in 1000 | 5334 ms | 16883 ms |
100 000 | 1 000 000 | 1 in 1000 | 86312 ms | 170271 ms |
This file contains hidden or 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
i32 sign(i32 number) | |
{ | |
i32 result; | |
if (number < 0) result = 0-1; | |
else if (number > 0) result = 1; | |
else result = 0; | |
return result; | |
} | |
// Release |
This file contains hidden or 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
i32 sign(i32 number) { | |
i32 result; | |
if (number < 0) result = 0-1; | |
else if (number > 0) result = 1; | |
else result = 0; | |
return result; | |
} | |
83 F9 00 0F 8C 05 00 00 00 E9 0A 00 00 00 B8 FF | |
FF FF FF E9 1D 00 00 00 83 F9 00 0F 8F 05 00 00 |
This file contains hidden or 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
| MODULE | push scope Module | |
void e() | FUNC e | insert e @ line 2 col 3 | |
{ | BLOCK | push scope e | |
i32 a; | VAR i32 a | push scope Block | |
i32 b; | VAR i32 b | insert a @ line 4 col 4 | |
i32 c; | VAR i32 c | insert b @ line 5 col 4 | |
| FUNC f | insert c @ line 6 col 4 | |
void f() { | BLOCK | insert f @ line 8 col 4 | |
i32 a; | VAR i32 a | push scope f | |
i32 b; | VAR i32 b | push scope Block |
This file contains hidden or 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
// dmd -m64 -lib -of="lib.lib" -debug -g -w -I="./" texteditor.d | |
// dmd -m64 -of="app.exe" -debug -g -w -I="./" lib.lib main.d | |
import texteditor; | |
void main() {} |
This file contains hidden or 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
module chunkedrange; | |
struct ChunkedRange(T) { size_t itemsLeft; } |
This file contains hidden or 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
module main; | |
import voxelman.graphics; | |
import voxelman.gui; | |
import voxelman.log; | |
import voxelman.math; | |
import voxelman.text.scale; | |
void main(string[] args) | |
{ |
This file contains hidden or 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
Links: | |
http://www.sparksandflames.com/files/x86InstructionChart.html | |
https://defuse.ca/online-x86-assembler.htm Online [dis]assembler | |
http://wiki.osdev.org/X86-64_Instruction_Encoding | |
https://www3.nd.edu/~dthain/courses/cse40243/fall2015/intel-intro.html Introduction to X86-64 Assembly for Compiler Writers | |
http://www.intel.com/products/processor/manuals/ Intel manuals | |
http://www.x86-64.org/documentation.html amd64 ABI | |
Vol 1. Chapter 3.4 | |
EAX — Accumulator for operands and results data |
This file contains hidden or 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
import std.stdio; | |
void main() | |
{ | |
HighLevel h; | |
writeln(h.fun()); | |
} | |
struct HighLevel | |
{ |
This file contains hidden or 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
module main; | |
import std.stdio; | |
void main() | |
{ | |
run_from_rwx(); | |
} | |
version(Posix) |