|
Dyron Apprentice
Joined: 08 Apr 2004 Posts: 103 Location: USA
|
Posted: Wed Dec 03, 2008 1:52 am
cMUD vs zMUD Speed |
I've heard that cmud actually runs slower than zmud, but after reading a bit on here, it seems the pros disagree..
In script running, which is faster cMUD or zMUD? |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Wed Dec 03, 2008 3:06 am |
There's really no comparison at all. CMud is slower on the initial run as it does extra overhead work of compilation and such when triggers and other settings are first created, but once it gets up to cruising speed we're talking 10ms (CMud) versus 100 ms (ZMud). Anyone who says otherwise is either doing something very inefficiently (ie, the older ZMud way) or is not as knowledgeable of ZMud/CMud scripting as they have lead you to believe.
|
|
_________________ EDIT: I didn't like my old signature |
|
|
|
charneus Wizard
Joined: 19 Jun 2005 Posts: 1876 Location: California
|
Posted: Wed Dec 03, 2008 3:45 am |
There are some aspects in which CMUD is slower (mapping aspects being part of that). But overall speed, CMUD blows zMUD out of the water generally. The mapper is only so slow because CMUD is getting a complete mapper rewrite, and optimization for the mapper is the last thing on Zugg's list until it's been completed.
If you write heavy scripts without using the mapper often, then CMUD is the way to go.
Charneus |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Wed Dec 03, 2008 10:00 am |
It depends on what exactly you're doing. Most operations are faster, but some are slower. Most scripts can be changed to be faster than they were in zMUD, but some won't be much faster out of the box - local variables are the chief tools for that.
Matt's correct that general script execution is faster because of the compiled scripts, but there're also additional overheads because CMUD uses a more robust database framework rather than simply dumping memory to disc like zMUD did; that sacrifices a little speed to stop crashes utterly destroying your settings, as they did in zMUD, and also making them much easier to share. Speed isn't CMUD's only goal.
PS. The mapper is no slower in the latest public version of CMUD - it's exactly the same code as zMUD's mapper, identical. It's slower in the latest beta version because the major objective of that version is to completely rewrite the mapper, and it's not done yet. To begin with, you probably shouldn't be using a beta version. |
|
|
|
Caled Sorcerer
Joined: 21 Oct 2000 Posts: 821 Location: Australia
|
Posted: Sun Dec 07, 2008 6:56 am |
There are definitely some things which end up slower- though as the others have said, due to bad scripting. I'm not playing much at the moment, so I have not had the time to try and work out what it is that I am doing wrong, but my curing system tends to cause me lag when I fight. I don't know why - the core of it is the same as it was in zmud. A handful of stringlists that I %sort.
I've changed a lot of bits to it though. I refer to database variables when I add an affliction to those stringlists, and when I have picked an affliction to cure, I refer to a dbvar for the relevant cure. I use events, functions, local vars and expression triggers. I thought that what I was doing would only make it more efficient, but -something- is causing it to stutter. I'm not blaming CMUD or saying you should not upgrade. I've written some scripts that just would not be viable in zMud (mostly having to do with curing unknown afflictions) and timed them; CMUD handles that sort of thing really well if you take advantage of local variables in particular.
It does seem to be a bit less forgiving of lazy/bad scripting than zMud though. Which is both a good and a bad thing. |
|
_________________ Athlon 64 3200+
Win XP Pro x64 |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Sun Dec 07, 2008 2:03 pm |
Stringlist operations should be faster now, but sorting is probably one of the slowest things you can do with them. I'd suggest using a dbvar to record which afflictions you have and hardcoding the logic that looks through deciding which affliction to cure.
|
|
|
|
Caled Sorcerer
Joined: 21 Oct 2000 Posts: 821 Location: Australia
|
Posted: Mon Dec 08, 2008 11:01 am |
I was completely happy with the speed my zmud system ran, on my crappy old computer. I'm using CMUD now on a better computer with 4 times the ram and a decent video card (the old one was integrated graphics, hehe). I used:
#IF (@zHerbb AND @herbb AND %numitems(@herbaffs)) {#EXEC %item(%sort(@herbaffs,1),1)}
in zMud. No speed issues at all.
Now, in CMUD, I do it a little differently. There are functions, dbvars, events, expression trigs. Actually, I think I'm going to create a new thread on this. |
|
_________________ Athlon 64 3200+
Win XP Pro x64 |
|
|
|
|
|