FlowerScirpt teaser

bobef bobef at abv_nospam.bg
Wed Sep 26 01:14:47 PDT 2007


I felt bad I accusing MiniD in slowness so I did the same test with MiniD from trunk and it is actually faster. This example takes 7.5 millisecs on my PC.

D:

import tango.text.Util;
import tango.io.File;

import minid.minid;
import minid.types;

void main()
{
	auto a=new tango.util.time.StopWatch.StopWatch;
	a.start();
	auto context = NewContext();
	scope auto f=new File("test.md");
	dchar[] buf=tango.text.convert.Utf.toUtf32(cast(char[])f.read());
	loadModuleString(context.mainThread,buf,null,"test.md");
	tango.io.Console.Cout("\n\n\n"~tango.text.convert.Float.toUtf8(a.stop()));
}

MiniD:

module test;

global SERVER={gosho="pesho"};
global COOKIE={gosho="pesho"};
for(local c=0;c<=1000;c++)
{
        local a=("gosho"~"["~SERVER["gosho"]~"]"~"="~SERVER["gosho"]~"<br />");
        local b=("gosho"~"["~COOKIE["gosho"]~"]"~"="~COOKIE["gosho"]~"<br />");
}



More information about the Digitalmars-d-announce mailing list