Jump to content


Photo

String Dll - 1,9 Times Faster Than String()!


  • Please log in to reply
8 replies to this topic

#1 Robot Freak

Robot Freak

    GMC Member

  • New Member
  • 271 posts

Posted 10 May 2007 - 05:51 PM

String DLL V1.0

Why using this DLL?
Because it's 1,8675213675213675213675213675214 times faster than the standard string function!

Please report bugs.

Credit to "Jan ten Bokkel".

DOWNLOAD HERE (124 kB .zip file)

string_init();
real_to_string(real);
win_message(str1,str2);
win_newline();
string_free();

Also check this string DLL

Edited by Murfy_the_game, 12 May 2007 - 05:06 PM.

  • 0

#2 Daniel-Dane

Daniel-Dane

    GMC Member

  • New Member
  • 3581 posts

Posted 10 May 2007 - 06:46 PM

You must remember that it also takes time for GM to call the DLL. So with that in mind; the fastest I could get it was to be 50% faster. Doing fewer or more operations will slow it down.
  • 0

#3 Zas

Zas

    GMC Member

  • New Member
  • 179 posts

Posted 10 May 2007 - 06:47 PM

How did you come up with such a number?
  • 0
I use in my answers.
Are you one of those who havenĀ“t read The Rules? I am not.

Join Game Maker Wiki Complete, the free Game Maker Guide that anyone can edit.

This sig has been edited by Zas: Jul 5 2008, 11:23 PM

#4 Robot Freak

Robot Freak

    GMC Member

  • New Member
  • 271 posts

Posted 10 May 2007 - 07:15 PM

first saving the current_time variable, then
repeat (10000)
{
string(200);
}

step event -> show_message(string(current_time-saved_time));

After doing that for both:
GM/DLL = 1,8675213675213675213675213675214 times faster

You must remember that it also takes time for GM to call the DLL. So with that in mind; the fastest I could get it was to be 50% faster. Doing fewer or more operations will slow it down.

I calculated with call time.

Edited by Murfy_the_game, 10 May 2007 - 07:17 PM.

  • 0

#5 fogger

fogger

    Clockwerk Studios

  • GMC Member
  • 430 posts
  • Version:GM6

Posted 10 May 2007 - 11:41 PM

Well I think GM is fast enough and this just contributes to the size.
But if you have a big game coming up and need the use of strings,
well this would be your first choice. But this hardly gets its potential
from small 1MB games.

~Pr0n
  • 0

#6 Yourself

Yourself

    The Ultimate Pronoun

  • GMC Elder
  • 7352 posts
  • Version:Unknown

Posted 11 May 2007 - 12:05 AM

The provided scripts don't even work if you put them in a separate editable. You can't even keep your variable names consistent.
  • 0

#7 NEED HELP sorta

NEED HELP sorta

    GMC Member

  • New Member
  • 1501 posts

Posted 11 May 2007 - 05:37 AM

What I want is an array DLL... seriously.
For this DLL, I can see uses, but I don't have any right now particularly, and it's so much easier just to use GM.

If you had a string heavy app it might come in handy I guess, so it's worth taking a look at.

Edit:
Oh my crackersburg, you already made a ds_list DLL... :(

Edited by NEED HELP sorta, 11 May 2007 - 06:18 AM.

  • 0
http://img159.images...025/scr1ea8.png
http://img374.images...944/scr2hf6.png
Alagaesia Online - Not yet released.

You can bring the release date closer, by helping at the following topics:
Intro Narration
Music Topic

#8 Daniel-Dane

Daniel-Dane

    GMC Member

  • New Member
  • 3581 posts

Posted 11 May 2007 - 06:10 AM

You must remember that it also takes time for GM to call the DLL. So with that in mind; the fastest I could get it was to be 50% faster. Doing fewer or more operations will slow it down.

I calculated with call time.

<{POST_SNAPBACK}>

Then try repeat (50000) and compare that and then repeat (1000). You will notice the difference.
  • 0

#9 NEED HELP sorta

NEED HELP sorta

    GMC Member

  • New Member
  • 1501 posts

Posted 11 May 2007 - 06:21 AM

Hmm...
It stands to reason that it would still be faster or similar, but it's still a good idea to test it out.
  • 0
http://img159.images...025/scr1ea8.png
http://img374.images...944/scr2hf6.png
Alagaesia Online - Not yet released.

You can bring the release date closer, by helping at the following topics:
Intro Narration
Music Topic