More faster-er.
This commit is contained in:
parent
0b8834a1b3
commit
5a6477f2ee
2
build.sh
2
build.sh
|
@ -1,3 +1,3 @@
|
||||||
#dmd *.d std/d/*.d -release -inline -noboundscheck -O -w -wi -m64 -property -ofdscanner -L-lsqlite3 #-inline
|
#dmd *.d std/d/*.d -release -inline -noboundscheck -O -w -wi -m64 -property -ofdscanner -L-lsqlite3 #-inline
|
||||||
#dmd *.d std/d/*.d -g -m64 -w -wi -property -ofdscanner -L-lsqlite3 #-unittest
|
#dmd *.d std/d/*.d -g -m64 -w -wi -property -ofdscanner -L-lsqlite3 #-unittest
|
||||||
ldc2 -O3 *.d std/d/*.d -of=dscanner -L-lsqlite3
|
ldc2 -O4 *.d std/d/*.d -of=dscanner -release
|
||||||
|
|
13
main.d
13
main.d
|
@ -18,14 +18,7 @@ import std.stdio;
|
||||||
import std.range;
|
import std.range;
|
||||||
import std.d.lexer;
|
import std.d.lexer;
|
||||||
|
|
||||||
import autocomplete;
|
|
||||||
import highlighter;
|
import highlighter;
|
||||||
import langutils;
|
|
||||||
import location;
|
|
||||||
import parser;
|
|
||||||
|
|
||||||
import types;
|
|
||||||
import circularbuffer;
|
|
||||||
|
|
||||||
immutable size_t CIRC_BUFF_SIZE = 4;
|
immutable size_t CIRC_BUFF_SIZE = 4;
|
||||||
|
|
||||||
|
@ -152,12 +145,12 @@ int main(string[] args)
|
||||||
{
|
{
|
||||||
config.fileName = arg;
|
config.fileName = arg;
|
||||||
uint count;
|
uint count;
|
||||||
//GC.disable();
|
auto f = File(arg);
|
||||||
foreach(t; byToken(cast(ubyte[]) File(arg).byLine(KeepTerminator.yes).join(), config))
|
ubyte[] buffer = uninitializedArray!(ubyte[])(f.size);
|
||||||
|
foreach(t; byToken(f.rawRead(buffer), config))
|
||||||
{
|
{
|
||||||
++count;
|
++count;
|
||||||
}
|
}
|
||||||
//GC.enable();
|
|
||||||
writefln("%s: %d", arg, count);
|
writefln("%s: %d", arg, count);
|
||||||
}
|
}
|
||||||
/+}+/
|
/+}+/
|
||||||
|
|
682
std/d/lexer.d
682
std/d/lexer.d
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue