Buy Official Merchandise!
Forumwarz is the first "Massively Single-Player" online RPG completely built around Internet culture.

You are currently looking at Flamebate, our community forums. Players can discuss the game here, strategize, and role play as their characters.

You need to be logged in to post and to see the uncensored versions of these forums.

Log in or Learn about Forumwarz

Civil Discussion
Switch to Role-Playing Civil Discussion

Viewing a Post

Evil Trout

MODERATOR
Avatar: 35 2023-04-24 23:24:10 +0000

[Crotch Zombie]

Level 21 Hacker

this site is deader than the toddlers in my basement

volatus Posted:

I… really don’t see how it can make things “more complicated”. In fact, it significantly simplifies the implementation! No need to make any queries at all to check for anything… you just run simple string-search and string-chopping functions, which by themselves are even faster than preg_match (perl regular expressions – also not necessary here), and ITSELF is even faster than a single MySQL query! It’s like an all-you-can-eat buffet of optimizations and simplified code, and it really quite boggles my mind as to how you can say it’s “more complicated”...

Perhaps we’re not understanding it the same way?

That string has to be stored in the database right?

So to read it, you need to query. To write it, you need to write a query to do that.

Now, from an efficiency point of view, looking for the occurrence of a letter in a string is slower than querying a database by index. Finding a letter in a string is O(n), finding a row by index in a database is O(n log n)

Not to mention, with the database index you get a guarantee that the same forum can’t be in there twice. With your method there is no guarantee of data integrity.

And many other reasons…

Internet Delay Chat
Have fun playing!
To chat with other players, you must Join Forumwarz or Log In now!