[Include] HSA - Easy and fast Saving!
#12

Nice.. But I got an other result for testing.

Код:
[09:32:17]   Loading filterscript 'test.amx'...
[09:32:17] SII write started
[09:32:17] SII test done in 196

[09:32:17] HSA write started
[09:32:18] HSA test done in 391

[09:32:18] SII read started
[09:32:18] SII test done in 84

[09:32:18] this is a short string 1234567890 0.123400

[09:32:18] HSA read started
[09:32:18] HSA test done in 145

[09:32:18] this is a short string 1234567890 0.123450

[09:32:18]   Loaded 1 filterscripts.
the test script.

Код:
#include <a_samp>
#include <sii>
#include <hsa>

#define TEST_TIME   100

public OnFilterScriptInit() {
	new tick = GetTickCount();
	print("SII write started");
	for(new i = 0; i < TEST_TIME; i++) {
	    INI_Open("sii.ini");
	    INI_WriteString("string", "this is a short string");
	    INI_WriteInt("int", 1234567890);
	    INI_WriteFloat("float", 0.12345);
	    INI_Save();
	    INI_Close();
	}
	printf("SII test done in %d\n", GetTickCount() - tick);
	
	tick = GetTickCount();
	
	print("HSA write started");
	for(new i = 0; i < TEST_TIME; i++) {
		setString:"hsa"("string", "this is a short string");
	    setInt:"hsa"("int", 1234567890);
		setFloat:"hsa"("float", 0.12345);
	}
	printf("HSA test done in %d\n", GetTickCount() - tick);
	
	new rstring[256], rint, Float:rfloat;
	
	tick = GetTickCount();
	
	print("SII read started");
	for(new i = 0; i < TEST_TIME; i++) {
	    INI_Open("sii.ini");
	    INI_ReadString(rstring, "string");
	    rint = INI_ReadInt("int");
	    rfloat = INI_ReadFloat("float");
	    INI_Close();
	}
	printf("SII test done in %d\n", GetTickCount() - tick);
	printf("%s %d %f\n", rstring, rint, rfloat);
	
	rstring[0] = EOS;
	rint = 0;
	rfloat = 0.0;
	
	tick = GetTickCount();
	
	print("HSA read started");
	for(new i = 0; i < TEST_TIME; i++) {
		format(rstring, sizeof(rstring), "%s", getString:"hsa"("string"));
	    rint = getInt:"hsa"("int");
		rfloat = getFloat:"hsa"("float");
	}
	printf("HSA test done in %d\n", GetTickCount() - tick);
	printf("%s %d %f\n", rstring, rint, rfloat);
	return 1;
}
Reply


Messages In This Thread
HSA - Easy and fast Saving! - by [LoD]Hauke - 23.03.2012, 17:19
Re: HSA - Easy and fast Saving! - by SpiderWalk - 23.03.2012, 17:35
Re: HSA - Easy and fast Saving! - by [LoD]Hauke - 23.03.2012, 18:33
Re: HSA - Easy and fast Saving! - by Kontrol - 23.03.2012, 20:37
Re: HSA - Easy and fast Saving! - by new121 - 23.03.2012, 20:48
Re: HSA - Easy and fast Saving! - by AMEENAMEEN - 23.03.2012, 22:05
Re: HSA - Easy and fast Saving! - by Ricop522 - 23.03.2012, 22:10
Re: HSA - Easy and fast Saving! - by kacper55331 - 23.03.2012, 22:18
Re: HSA - Easy and fast Saving! - by Kaperstone - 24.03.2012, 00:43
Re: HSA - Easy and fast Saving! - by J.K - 24.03.2012, 00:45
Re: HSA - Easy and fast Saving! - by Ballu Miaa - 24.03.2012, 01:14
Re: HSA - Easy and fast Saving! - by NeTuddMeg - 24.03.2012, 08:29
Re: HSA - Easy and fast Saving! - by Shadow_ - 24.03.2012, 09:34
Re: HSA - Easy and fast Saving! - by [LoD]Hauke - 24.03.2012, 10:09
Re: HSA - Easy and fast Saving! - by Lorenc_ - 24.03.2012, 10:31
Re: HSA - Easy and fast Saving! - by SlashPT - 24.03.2012, 10:40
Re: HSA - Easy and fast Saving! - by Niko_boy - 24.03.2012, 11:03
Re: HSA - Easy and fast Saving! - by DonWade - 24.03.2012, 11:16
Re: HSA - Easy and fast Saving! - by NeTuddMeg - 24.03.2012, 13:53
Re: HSA - Easy and fast Saving! - by TheArcher - 24.03.2012, 13:59
Re: HSA - Easy and fast Saving! - by NeTuddMeg - 24.03.2012, 16:57
Re: HSA - Easy and fast Saving! - by TheArcher - 24.03.2012, 17:26
Re: HSA - Easy and fast Saving! - by new121 - 24.03.2012, 22:11
Re: HSA - Easy and fast Saving! - by Shadow_ - 24.03.2012, 22:12
Re: HSA - Easy and fast Saving! - by Guilherme_. - 24.03.2012, 22:48
Re: HSA - Easy and fast Saving! - by [LoD]Hauke - 25.03.2012, 17:34

Forum Jump:


Users browsing this thread: 1 Guest(s)