[Include] dini2.inc - Improved dini file processor with amazing benchmarks (aka. gini)!
#33

Quote:
Originally Posted by ******
Посмотреть сообщение
The first test is writing a single INI file with 1,000,000 lines. The second test is more accurately testing writing a single file with 10 lines. It is the same with reading:

Open the file ONCE. Parse the file ONCE. Read some easy variables a load of times. The thing you need to be timing is "INI::OpenINI". That is the slow part, and that is why y_ini's reading was so much slower:

pawn Код:
for (new i; i < 100000; i++)
    {
        INI_ParseFile("Test.ini", "LoadFile");
    }
It makes sense to constantly parse inside the loop insteda of just one time because practically you don't open one file while updating player record etc.
I have made a new speed test above: (I am not even touching the redaing part for YINI and it slower already according to the test if it's done right)

Result:
PHP код:
[18:20:516134 ms
[18:21:0210922 ms 
Code:
PHP код:
#include <a_samp>
#include <dini2>
#include <YSI\y_ini>
main()
{
    new 
se;
    
    
GetTickCount();
    for (new 
i100000i++)
    {
        
dini_Get("Test1.ini""Set1");
        
dini_Int("Test1.ini""Set2");
        
dini_Float("Test1.ini""Set3");
        
dini_Timeout("Test1.ini");
    }
    
GetTickCount();
    
printf("%i ms"e-s);
    
GetTickCount();
    for (new 
i100000i++)
    {
        
INI_ParseFile("Test2.ini""LoadFile");
    }
    
GetTickCount();
    
printf("%i ms"e-s);

Quote:
Originally Posted by ******
Посмотреть сообщение
Your eINI code is more similar to your DINI2 code, but again because you are doing the hard part only once, any real differences get lost in the noise.

Again: I don't know if this system truly is faster because your tests don't show anything meaningful. You skip the hard work in some tests, repeat it in others, then claim that the first test was faster - of course it is!
Here is a speed test comparing eINI and dini2/gini reading speed, similarly before, i open and close file each time inside the loop:

Result:
PHP код:
[18:29:106182 ms
[18:29:187756 ms 
Code:
PHP код:
#include <a_samp>
#include <dini2>
#include <eINI>
main()
{
    new 
se;
    
    
GetTickCount();
    for (new 
i100000i++)
    {
        
dini_Get("Test1.ini""Set1");
        
dini_Int("Test1.ini""Set2");
        
dini_Float("Test1.ini""Set3");
        
dini_Timeout("Test1.ini");
    }
    
GetTickCount();
    
printf("%i ms"e-s);
    
GetTickCount();
    new 
INI:handleread;
    for (new 
i100000i++)
    {
        
handle INI::OpenINI("Test1.ini"INI_READ);
        
INI::ReadString(handle"""Set1""");
        
INI::ReadInteger(handleread"Set2""");
        
INI::ReadFloat(handleFloat:read"Set3""");
        
INI::CloseINI(handle);
    }
    
GetTickCount();
    
printf("%i ms"e-s);

Reply


Messages In This Thread
dini2.inc - Improved dini file processor with amazing performance (aka. gini)! - by Gammix - 05.07.2016, 23:13
Re: gini.inc - Fast multi file processor with "dini's" syntax - by Dayvison_ - 06.07.2016, 00:59
Re: gini.inc - Fast multi file processor with "dini's" syntax - by Gammix - 06.07.2016, 01:12
Re: gini.inc - Fast multi file processor with "dini's" syntax - by Uberanwar - 06.07.2016, 01:19
Re: gini.inc - Fast multi file processor with "dini's" syntax - by Shady - 06.07.2016, 02:26
Re: gini.inc - Fast multi file processor with "dini's" syntax - by Gammix - 06.07.2016, 03:02
Re: gini.inc - Fast multi file processor with "dini's" syntax - by Shady - 06.07.2016, 03:11
Re: gini.inc - Fast multi file processor with "dini's" syntax - by WhiteGhost - 06.07.2016, 03:36
Re: gini.inc - Fast multi file processor with "dini's" syntax - by Gammix - 06.07.2016, 03:54
Re: gini.inc - Fast multi file processor with "dini's" syntax - by SystemX - 06.07.2016, 04:11
Re: gini.inc - Fast multi file processor with "dini's" syntax - by Ritzy2K - 06.07.2016, 05:04
Re: gini.inc - Fast multi file processor with "dini's" syntax - by Yashas - 06.07.2016, 12:56
Re: gini.inc - Fast multi file processor with "dini's" syntax - by GhostHacker - 06.07.2016, 13:15
Re: gini.inc - Fast multi file processor with "dini's" syntax - by Gammix - 08.07.2016, 00:43
Re: gini.inc - Fast multi file processor with "dini's" syntax - by Kar - 08.07.2016, 04:54
Re: gini.inc - Fast multi file processor with "dini's" syntax - by Gammix - 08.07.2016, 05:20
Re: gini.inc - Fast multi file processor with "dini's" syntax - by Romz - 08.07.2016, 06:37
Re: gini.inc - Fast multi file processor with "dini's" syntax - by Gammix - 08.07.2016, 14:43
Re: gini.inc - Fast multi file processor with "dini's" syntax - by Gammix - 08.07.2016, 17:35
Re: gini.inc - Fast multi file processor with "dini's" syntax - by Dalayma - 09.07.2016, 17:01
Re: gini.inc - Fast multi file processor with "dini's" syntax - by Gammix - 09.07.2016, 17:23
Re: gini.inc - Fast multi file processor with "dini's" syntax - by Dalayma - 09.07.2016, 20:53
Re: gini.inc - Fast multi file processor with "dini's" syntax - by Gammix - 09.07.2016, 21:01
Re: gini.inc - Fast multi file processor with "dini's" syntax - by Yashas - 15.07.2016, 17:30
Re: gini.inc - Fast multi file processor with "dini's" syntax - by Gammix - 15.07.2016, 19:22
Re: gini.inc - Fast multi file processor with "dini's" syntax - by Sioux - 21.07.2016, 18:57
Re: gini.inc - Fast multi file processor with "dini's" syntax - by iKarim - 21.07.2016, 19:10
Re: gini.inc - Fast multi file processor with "dini's" syntax - by Dalayma - 26.07.2016, 16:02
Re: gini.inc - Fast multi file processor with "dini's" syntax - by Gammix - 27.07.2016, 04:39
Re: gini.inc - Fast multi file processor with "dini's" syntax - by Gammix - 14.11.2016, 14:56
Re: gini.inc - Fast multi file processor with "dini's" syntax - by 14_KaPaT - 14.11.2016, 18:17
Re: gini.inc - Fast multi file processor with "dini's" syntax - by Gammix - 14.11.2016, 18:30
Re: gini.inc - Fast multi file processor with "dini's" syntax - by Gammix - 15.11.2016, 22:35
Re: gini.inc - Fast multi file processor with "dini's" syntax - by Vadyanga - 29.11.2016, 12:47
Re: gini.inc - Fast multi file processor with "dini's" syntax - by Vadyanga - 29.11.2016, 12:49
Re: gini.inc - Fast multi file processor with "dini's" syntax - by Zorono - 02.12.2016, 12:08
Re: gini.inc - Fast multi file processor with "dini's" syntax - by JokeyL - 13.12.2016, 17:36
Re: gini.inc - Fast multi file processor with "dini's" syntax - by Gammix - 14.12.2016, 13:22
Re: gini.inc - Fast multi file processor with "dini's" syntax - by JokeyL - 14.12.2016, 17:06
Re: gini.inc - Fast multi file processor with "dini's" syntax - by Gammix - 15.12.2016, 03:55
Re: gini.inc - Fast multi file processor with "dini's" syntax - by JokeyL - 17.12.2016, 20:18
Re: gini.inc - Fast multi file processor with "dini's" syntax - by Gammix - 18.12.2016, 03:25
Re: gini.inc - Fast multi file processor with "dini's" syntax - by JokeyL - 18.12.2016, 11:44
Re: gini.inc - Fast multi file processor with "dini's" syntax - by Gammix - 18.12.2016, 12:01
Re: gini.inc - Fast multi file processor with "dini's" syntax - by JokeyL - 18.12.2016, 12:14
Re: gini.inc - Fast multi file processor with "dini's" syntax - by JokeyL - 18.12.2016, 12:29
Re: gini.inc - Fast multi file processor with "dini's" syntax - by Gammix - 18.12.2016, 12:42
Re: gini.inc - Fast multi file processor with "dini's" syntax - by JokeyL - 18.12.2016, 12:57
Re: dini2.inc - Improved dini file processor with amazing benchmarks (aka. gini)! - by JokeyL - 18.12.2016, 13:16
Re: dini2.inc - Improved dini file processor with amazing benchmarks (aka. gini)! - by Gammix - 18.12.2016, 13:32
Re: dini2.inc - Improved dini file processor with amazing benchmarks (aka. gini)! - by Gammix - 28.12.2016, 13:29
Re: dini2.inc - Improved dini file processor with amazing benchmarks (aka. gini)! - by JokeyL - 28.12.2016, 16:38
Re: dini2.inc - Improved dini file processor with amazing benchmarks (aka. gini)! - by Gammix - 28.12.2016, 17:12
Re: dini2.inc - Improved dini file processor with amazing benchmarks (aka. gini)! - by CantBeJohn - 28.12.2016, 19:30
Re: dini2.inc - Improved dini file processor with amazing benchmarks (aka. gini)! - by Gammix - 28.12.2016, 19:55
Re: dini2.inc - Improved dini file processor with amazing benchmarks (aka. gini)! - by CantBeJohn - 28.12.2016, 20:16
Re: dini2.inc - Improved dini file processor with amazing benchmarks (aka. gini)! - by JokeyL - 29.12.2016, 12:45
Re: dini2.inc - Improved dini file processor with amazing benchmarks (aka. gini)! - by JokeyL - 08.01.2017, 15:59
Re: dini2.inc - Improved dini file processor with amazing benchmarks (aka. gini)! - by JokeyL - 11.01.2017, 18:06
Re: dini2.inc - Improved dini file processor with amazing benchmarks (aka. gini)! - by Gammix - 11.01.2017, 19:02
Re: dini2.inc - Improved dini file processor with amazing benchmarks (aka. gini)! - by JokeyL - 12.01.2017, 17:41
Re: dini2.inc - Improved dini file processor with amazing benchmarks (aka. gini)! - by czop1223 - 14.01.2017, 02:59
Re: dini2.inc - Improved dini file processor with amazing benchmarks (aka. gini)! - by JokeyL - 14.01.2017, 20:46
Re: dini2.inc - Improved dini file processor with amazing benchmarks (aka. gini)! - by Gammix - 16.01.2017, 14:06
Re: dini2.inc - Improved dini file processor with amazing benchmarks (aka. gini)! - by Romz - 16.01.2017, 14:14
Re: dini2.inc - Improved dini file processor with amazing benchmarks (aka. gini)! - by Gammix - 16.01.2017, 14:24
Re: dini2.inc - Improved dini file processor with amazing benchmarks (aka. gini)! - by JokeyL - 16.01.2017, 17:54
Re: dini2.inc - Improved dini file processor with amazing benchmarks (aka. gini)! - by JokeyL - 20.01.2017, 07:29
Re: dini2.inc - Improved dini file processor with amazing benchmarks (aka. gini)! - by Gammix - 22.01.2017, 14:18
Re: dini2.inc - Improved dini file processor with amazing benchmarks (aka. gini)! - by Lordzy - 22.01.2017, 15:04
Re: dini2.inc - Improved dini file processor with amazing benchmarks (aka. gini)! - by Gammix - 22.01.2017, 16:16
Re: dini2.inc - Improved dini file processor with amazing benchmarks (aka. gini)! - by Lordzy - 22.01.2017, 16:58
Re: dini2.inc - Improved dini file processor with amazing benchmarks (aka. gini)! - by JokeyL - 22.01.2017, 21:29
Re: dini2.inc - Improved dini file processor with amazing benchmarks (aka. gini)! - by Gammix - 22.01.2017, 22:33
Re: dini2.inc - Improved dini file processor with amazing benchmarks (aka. gini)! - by JokeyL - 23.01.2017, 19:31
Re: dini2.inc - Improved dini file processor with amazing benchmarks (aka. gini)! - by OneDay - 19.05.2017, 12:42
Re: dini2.inc - Improved dini file processor with amazing benchmarks (aka. gini)! - by Gammix - 19.05.2017, 12:51
Re: dini2.inc - Improved dini file processor with amazing benchmarks (aka. gini)! - by JokeyL - 23.05.2017, 17:38
Re: dini2.inc - Improved dini file processor with amazing benchmarks (aka. gini)! - by asri - 26.05.2017, 03:58
Re: dini2.inc - Improved dini file processor with amazing benchmarks (aka. gini)! - by iLearner - 07.06.2017, 06:10
Re: dini2.inc - Improved dini file processor with amazing benchmarks (aka. gini)! - by Gammix - 12.06.2017, 13:31
Re: dini2.inc - Improved dini file processor with amazing benchmarks (aka. gini)! - by JokeyL - 12.06.2017, 14:14
Re: dini2.inc - Improved dini file processor with amazing benchmarks (aka. gini)! - by Gammix - 12.06.2017, 16:29
Re: dini2.inc - Improved dini file processor with amazing benchmarks (aka. gini)! - by JokeyL - 12.06.2017, 21:44
Re: dini2.inc - Improved dini file processor with amazing benchmarks (aka. gini)! - by iLearner - 12.06.2017, 22:07
Re: dini2.inc - Improved dini file processor with amazing benchmarks (aka. gini)! - by Gammix - 13.06.2017, 04:32
Re: dini2.inc - Improved dini file processor with amazing benchmarks (aka. gini)! - by Dalayma - 13.06.2017, 05:41
Re: dini2.inc - Improved dini file processor with amazing benchmarks (aka. gini)! - by JokeyL - 13.06.2017, 10:50
Re: dini2.inc - Improved dini file processor with amazing benchmarks (aka. gini)! - by Yousha - 06.07.2017, 17:40
Re: dini2.inc - Improved dini file processor with amazing benchmarks (aka. gini)! - by iLearner - 21.08.2017, 21:42
Re: dini2.inc - Improved dini file processor with amazing benchmarks (aka. gini)! - by Belengher - 05.10.2017, 14:51
Re: dini2.inc - Improved dini file processor with amazing benchmarks (aka. gini)! - by Gammix - 05.10.2017, 16:15
Re: dini2.inc - Improved dini file processor with amazing benchmarks (aka. gini)! - by JokeyL - 05.10.2017, 16:39
Re: dini2.inc - Improved dini file processor with amazing benchmarks (aka. gini)! - by Gammix - 06.10.2017, 23:42
Re: dini2.inc - Improved dini file processor with amazing benchmarks (aka. gini)! - by JokeyL - 08.10.2017, 21:48
Re: dini2.inc - Improved dini file processor with amazing benchmarks (aka. gini)! - by Marllun - 21.11.2017, 03:04
Re: dini2.inc - Improved dini file processor with amazing benchmarks (aka. gini)! - by Usmanmemon - 21.11.2017, 15:29
Re: dini2.inc - Improved dini file processor with amazing benchmarks (aka. gini)! - by Gammix - 21.11.2017, 15:42
Re: dini2.inc - Improved dini file processor with amazing benchmarks (aka. gini)! - by Usmanmemon - 21.11.2017, 15:55
Re: dini2.inc - Improved dini file processor with amazing benchmarks (aka. gini)! - by Gammix - 01.12.2017, 18:00
Re: dini2.inc - Improved dini file processor with amazing benchmarks (aka. gini)! - by Marllun - 11.12.2017, 03:40
Re: dini2.inc - Improved dini file processor with amazing benchmarks (aka. gini)! - by Gammix - 11.12.2017, 04:13
Re: dini2.inc - Improved dini file processor with amazing benchmarks (aka. gini)! - by haikalbintang - 16.12.2017, 00:00
Re: dini2.inc - Improved dini file processor with amazing benchmarks (aka. gini)! - by Gammix - 16.12.2017, 23:03
Re: dini2.inc - Improved dini file processor with amazing benchmarks (aka. gini)! - by RoyalGamer - 17.12.2017, 04:20
Re: dini2.inc - Improved dini file processor with amazing benchmarks (aka. gini)! - by Gammix - 05.01.2018, 19:02
Re: dini2.inc - Improved dini file processor with amazing benchmarks (aka. gini)! - by RogueDrifter - 05.01.2018, 19:11
Re: dini2.inc - Improved dini file processor with amazing benchmarks (aka. gini)! - by Gammix - 05.01.2018, 23:37
Re: dini2.inc - Improved dini file processor with amazing benchmarks (aka. gini)! - by RogueDrifter - 05.01.2018, 23:50
Re: dini2.inc - Improved dini file processor with amazing benchmarks (aka. gini)! - by Gammix - 06.01.2018, 00:58
Re: dini2.inc - Improved dini file processor with amazing benchmarks (aka. gini)! - by RogueDrifter - 06.01.2018, 02:27
Re: dini2.inc - Improved dini file processor with amazing benchmarks (aka. gini)! - by haikalbintang - 20.01.2018, 09:38
Re: dini2.inc - Improved dini file processor with amazing benchmarks (aka. gini)! - by RogueDrifter - 20.01.2018, 09:50
Re: dini2.inc - Improved dini file processor with amazing benchmarks (aka. gini)! - by haikalbintang - 20.01.2018, 10:49
Re: dini2.inc - Improved dini file processor with amazing benchmarks (aka. gini)! - by ItzColaBoi - 01.02.2018, 12:00
Re: dini2.inc - Improved dini file processor with amazing benchmarks (aka. gini)! - by Gammix - 01.02.2018, 18:26
Re: dini2.inc - Improved dini file processor with amazing benchmarks (aka. gini)! - by Unkovic - 24.02.2018, 11:55
Re: dini2.inc - Improved dini file processor with amazing benchmarks (aka. gini)! - by ItzColaBoi - 24.02.2018, 12:10
Re: dini2.inc - Improved dini file processor with amazing benchmarks (aka. gini)! - by insus100 - 07.03.2018, 14:27
Re: dini2.inc - Improved dini file processor with amazing benchmarks (aka. gini)! - by Gammix - 07.03.2018, 14:52
Re: dini2.inc - Improved dini file processor with amazing benchmarks (aka. gini)! - by insus100 - 07.03.2018, 14:56
Re: dini2.inc - Improved dini file processor with amazing benchmarks (aka. gini)! - by Mike861 - 10.03.2018, 13:14
Re: dini2.inc - Improved dini file processor with amazing benchmarks (aka. gini)! - by Gammix - 10.03.2018, 17:40
Re: dini2.inc - Improved dini file processor with amazing benchmarks (aka. gini)! - by Mike861 - 10.03.2018, 18:06
Re: dini2.inc - Improved dini file processor with amazing benchmarks (aka. gini)! - by Mike861 - 10.03.2018, 18:31
Re: dini2.inc - Improved dini file processor with amazing benchmarks (aka. gini)! - by Gammix - 10.03.2018, 18:37
Re: dini2.inc - Improved dini file processor with amazing benchmarks (aka. gini)! - by Mike861 - 10.03.2018, 18:38
Re: dini2.inc - Improved dini file processor with amazing benchmarks (aka. gini)! - by Gammix - 10.03.2018, 19:20
Re: dini2.inc - Improved dini file processor with amazing benchmarks (aka. gini)! - by Mike861 - 10.03.2018, 19:24
Re: dini2.inc - Improved dini file processor with amazing benchmarks (aka. gini)! - by Gammix - 10.03.2018, 19:30
Re: dini2.inc - Improved dini file processor with amazing benchmarks (aka. gini)! - by Mike861 - 10.03.2018, 19:38
Re: dini2.inc - Improved dini file processor with amazing benchmarks (aka. gini)! - by Gammix - 10.03.2018, 20:28
Re: dini2.inc - Improved dini file processor with amazing benchmarks (aka. gini)! - by Mike861 - 10.03.2018, 20:30
Re: dini2.inc - Improved dini file processor with amazing benchmarks (aka. gini)! - by Exhibit - 26.03.2018, 15:34
Re: dini2.inc - Improved dini file processor with amazing benchmarks (aka. gini)! - by Exhibit - 28.03.2018, 15:46

Forum Jump:


Users browsing this thread: 7 Guest(s)