More faster-er.

This commit is contained in:
Hackerpilot 2013-02-04 16:34:58 -08:00
parent 0b8834a1b3
commit 5a6477f2ee
3 changed files with 263 additions and 462 deletions

View File

@ -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
View File

@ -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);
} }
/+}+/ /+}+/

File diff suppressed because it is too large Load Diff