A SWATH vs. TWX challenge
| Author |
Message |
|
Promethius
Ambassador
Joined: Mon Feb 09, 2004 3:00 am Posts: 3141 Location: Kansas
|
 Re: A SWATH vs. TWX challenge
bah! You would have to add that "assuming the script is well written" part. That leaves my scripts out..
_________________
/ Promethius / Enigma / Wolfen /
"A man who has no skills can be taught, a man who has no honor has nothing."
|
| Sun Aug 21, 2011 12:36 am |
|
 |
|
LoneStar
Commander
Joined: Fri Jun 09, 2006 2:00 am Posts: 1401 Location: Canada
|
 Re: A SWATH vs. TWX challenge
SWATH is a great GUI, but I doubt anyone will be able to come up with a 'Helper' faster than TWX. As soon as you bring the Windows API into the picture, as Donnie Brasco would say: Forget about it.
_________________ ---------------------------- -= QUANTUM Computing 101: 15 = 3 x 5 ... 48% of the time.
|
| Sun Aug 21, 2011 1:20 am |
|
 |
|
ElderProphet
Commander
Joined: Tue Oct 07, 2003 2:00 am Posts: 1134 Location: Augusta, GA
|
 Re: A SWATH vs. TWX challenge
Heh, the scripts of yours that I remember were well written Prome.
TWX could be a lot faster actually. I've done a lot to speed up areas of TWX, but there are still some significant bottlenecks... which I'm continually working to address. But you are right, TWX is a compiled scripting language on top of Delphi, which is a bare-metal type language like C/C++ (performance wise). If you start trying to build a helper on top of Java or even C#, interpreted languages which are themselves compiled to virtual machine code, you have to work extra hard to keep performance high.
_________________ Claim to Fame: only guy to ever crack the TW haggle algorithm, and fig/shield/hold price formula, twice.
|
| Sun Aug 21, 2011 1:00 pm |
|
 |
|
Mongoose
Commander
Joined: Mon Oct 29, 2001 3:00 am Posts: 1096 Location: Tucson, AZ
|
 Re: A SWATH vs. TWX challenge
ElderProphet wrote: assuming the script is well written of course. That's the key. Your scripts are elegant, but I've seen many that aren't. TWX script actually reminds me a bit of shell script...
_________________ Suddenly you're Busted!
|
| Sun Aug 21, 2011 1:12 pm |
|
 |
|
Mongoose
Commander
Joined: Mon Oct 29, 2001 3:00 am Posts: 1096 Location: Tucson, AZ
|
 Re: A SWATH vs. TWX challenge
ElderProphet wrote: If you start trying to build a helper on top of Java or even C#, interpreted languages which are themselves compiled to virtual machine code, you have to work extra hard to keep performance high. There are ways to write bad code in Java that result in bad performance, where a language like C would just segfault or leak memory or something. Java can be fast, though. I'm surprised SWATH is as fast as it is, because JNI (passing data between the JVM and native code) is one of the slower aspects of Java. And SWATH has to do that every time a script interacts with the database or the game. I'm curious how fast a pure Java helper could be...
_________________ Suddenly you're Busted!
|
| Sun Aug 21, 2011 8:36 pm |
|
 |
|
Mongoose
Commander
Joined: Mon Oct 29, 2001 3:00 am Posts: 1096 Location: Tucson, AZ
|
 Re: A SWATH vs. TWX challenge
Master Blaster wrote: LOL, don't any of you guys have girl friends? Ha. I've been at her place since last night. She's dealing with her friend's relationship crisis right now, which is why I'm on the forums. If I were home, I'd be coding. 
_________________ Suddenly you're Busted!
|
| Sun Aug 21, 2011 8:40 pm |
|
 |
|
Mongoose
Commander
Joined: Mon Oct 29, 2001 3:00 am Posts: 1096 Location: Tucson, AZ
|
 Re: A SWATH vs. TWX challenge
I've discovered that SWATH comes pretty close to the speed of TWX even with text display on if you go into preferences > miscellaneous, check "high text speed limit", and set it pretty low. This dramatically speeds up the display.
_________________ Suddenly you're Busted!
|
| Fri Sep 02, 2011 3:28 pm |
|
 |
|
Singularity
Veteran Op
Joined: Thu Jun 02, 2005 2:00 am Posts: 5558 Location: USA
|
 Re: A SWATH vs. TWX challenge
Swath, even with that checked, is no where near as fast as TWX and a non-processing client. You should run an actual side by side comparison of CPU load while doing processing-heavy activities.
The problem is one of simple CPU power. If you run the thing on a beast, it'll run elegantly. But if you run it on a 5 year old single core machine, not so much. To complicate matters, a lot of us are now using VMs. I play all of my TWX these days inside virtualbox (host: ubuntu, guest: XP). It emulates a single core machine with 1gb ram, and has to emulate the display output. Swath runs very poorly on it. I used to love Swath, but these days it's almost unusable. Zoc, on the other hand, is a speed demon. Putty is even faster.
_________________ May the unholy fires of corbomite ignite deep within the depths of your soul...
1. TWGS server @ twgs.navhaz.com 2. The NavHaz Junction - Tradewars 2002 Scripts, Resources and Downloads 3. Open IRC chat @ irc.freenode.net:6667 #twchan 4. Parrothead wrote: Jesus wouldn't Subspace Crawl.
*** SG memorial donations via paypal to: dpocky68@booinc.com
|
| Fri Sep 02, 2011 7:53 pm |
|
 |
|
Master Blaster
Gameop
Joined: Mon Apr 16, 2001 2:00 am Posts: 419 Location: Denver Colorado
|
 Re: A SWATH vs. TWX challenge
Singularity wrote: Swath, even with that checked, is no where near as fast as TWX and a non-processing client. You should run an actual side by side comparison of CPU load while doing processing-heavy activities.
The problem is one of simple CPU power. If you run the thing on a beast, it'll run elegantly. But if you run it on a 5 year old single core machine, not so much. To complicate matters, a lot of us are now using VMs. I play all of my TWX these days inside virtualbox (host: ubuntu, guest: XP). It emulates a single core machine with 1gb ram, and has to emulate the display output. Swath runs very poorly on it. I used to love Swath, but these days it's almost unusable. Zoc, on the other hand, is a speed demon. Putty is even faster. So is a browser that can't display images .. (sic) Sometimes, having the plush is still faster. Ferrari VS Bugatti Veyron, which do you choose? Before you answer, the Bugatti weighs over 4500 lbs and is a luxury car of the utmost caliber. (At 256 MPH, you can still hold a normal conversation with your passenger)
_________________ twarbase.com:23
|
| Fri Sep 02, 2011 8:52 pm |
|
 |
|
Mongoose
Commander
Joined: Mon Oct 29, 2001 3:00 am Posts: 1096 Location: Tucson, AZ
|
 Re: A SWATH vs. TWX challenge
On my single-core V105 netbook, running SWATH and TWX in WINE, I can barely tell any difference. And simple benchmarks like this ZTM algorithm show a few percentage points difference at most. The slowness of SWATH's built-in scripts is due almost entirely to the fact that they wait for each prompt before sending the next action, not because SWATH is inherently slower. SWATH's scripts are written for safety, but you can write your own for speed.
_________________ Suddenly you're Busted!
|
| Fri Sep 02, 2011 9:24 pm |
|
 |
|
Singularity
Veteran Op
Joined: Thu Jun 02, 2005 2:00 am Posts: 5558 Location: USA
|
 Re: A SWATH vs. TWX challenge
Mongoose wrote: On my single-core V105 netbook, running SWATH and TWX in WINE, I can barely tell any difference. And simple benchmarks like this ZTM algorithm show a few percentage points difference at most. The slowness of SWATH's built-in scripts is due almost entirely to the fact that they wait for each prompt before sending the next action, not because SWATH is inherently slower. SWATH's scripts are written for safety, but you can write your own for speed. First, the ztm benchmark isn't the best benchmark. Adding a node to a linked list is not inherently a CPU intensive process. You need something that requires a random lookup, a random write, and a random read. Additionally, I didn't say Swath under wine, I said Swath under a VM. Wine is not a VM, it's not an emulator, it's an API layer. It's also very very unstable, and not suitable for long-term play (it crashes, a lot). Either way, if you run a decent gridder you will see what I mean about the freeze-ups. Also, the biggest limitation won't often be processing speed (altho at the wrong times, that can get you killed). The biggest limitation will be the inability to load multiple background scripts.
_________________ May the unholy fires of corbomite ignite deep within the depths of your soul...
1. TWGS server @ twgs.navhaz.com 2. The NavHaz Junction - Tradewars 2002 Scripts, Resources and Downloads 3. Open IRC chat @ irc.freenode.net:6667 #twchan 4. Parrothead wrote: Jesus wouldn't Subspace Crawl.
*** SG memorial donations via paypal to: dpocky68@booinc.com
|
| Sat Sep 03, 2011 10:11 am |
|
 |
|
Micro
Ambassador
Joined: Wed Apr 20, 2011 1:19 pm Posts: 2559 Location: Oklahoma City, OK 73170 US
|
 Re: A SWATH vs. TWX challenge
Singularity wrote: Also, the biggest limitation won't often be processing speed (altho at the wrong times, that can get you killed). The biggest limitation will be the inability to load multiple background scripts. Swath doesn't have that ability?
_________________ Regards, Micro Website: http://www.microblaster.net TWGS2.20b/TW3.34: telnet://twgs.microblaster.net:2002
ICQ is Dead Jim! Join us on Discord: https://discord.gg/zvEbArscMN
|
| Sat Sep 03, 2011 12:52 pm |
|
 |
|
Mongoose
Commander
Joined: Mon Oct 29, 2001 3:00 am Posts: 1096 Location: Tucson, AZ
|
 Re: A SWATH vs. TWX challenge
I think the ZTM benchmark actually is a pretty good benchmark, because it makes frequent JNI calls, which are one of the slowest aspects of SWATH. Any time a Java script accesses the database, it has to go through JNI. The "distance map" algorithm in my ZTM makes a JNI call for every course it plots, after it sees that the parsing is done. Basically, it's a worst-case scenario for SWATH scripts, and it still comes within 8% of the speed of TWX. When I need a lot of data from SWATH, I avoid multiple JNI calls. For example, the difference between calling Swath.getSector(int sector) multiple times, vs. calling Swath.getSectors(int[] sectors) once, can be enormous. Tricks like this are the key to fast scripts. I remember SWATH being flaky under WINE back in 2003, but I've yet to experience a single crash or instance of instability since my return... except when I was doing weird stuff with threads, trying to read from the DB while the parser was writing to the DB. Then it locked up. Does SWATH only allow one UserDefinedDaemon? I haven't experimented with those much yet...
_________________ Suddenly you're Busted!
|
| Sat Sep 03, 2011 1:09 pm |
|
 |
|
Singularity
Veteran Op
Joined: Thu Jun 02, 2005 2:00 am Posts: 5558 Location: USA
|
 Re: A SWATH vs. TWX challenge
Micro wrote: Swath doesn't have that ability? Last I checked, it can only have one script running at a time.
_________________ May the unholy fires of corbomite ignite deep within the depths of your soul...
1. TWGS server @ twgs.navhaz.com 2. The NavHaz Junction - Tradewars 2002 Scripts, Resources and Downloads 3. Open IRC chat @ irc.freenode.net:6667 #twchan 4. Parrothead wrote: Jesus wouldn't Subspace Crawl.
*** SG memorial donations via paypal to: dpocky68@booinc.com
|
| Sat Sep 03, 2011 1:12 pm |
|
 |
|
Singularity
Veteran Op
Joined: Thu Jun 02, 2005 2:00 am Posts: 5558 Location: USA
|
 Re: A SWATH vs. TWX challenge
Mongoose wrote: I think the ZTM benchmark actually is a pretty good benchmark, because it makes frequent JNI calls, which are one of the slowest aspects of SWATH. Any time a Java script accesses the database, it has to go through JNI. The "distance map" algorithm in my ZTM makes a JNI call for every course it plots, after it sees that the parsing is done. Basically, it's a worst-case scenario for SWATH scripts, and it still comes within 8% of the speed of TWX. Except it isn't. Adding a node to a linked list is inherently a low-CPU endeavor. If you want an honest evaluation of both then you need to compare multiple methods and sort them accordingly. Everything else is just propaganda. Pro or con, bias is bias. An honest appraisal would yield both strengths and weaknesses in both engines.
_________________ May the unholy fires of corbomite ignite deep within the depths of your soul...
1. TWGS server @ twgs.navhaz.com 2. The NavHaz Junction - Tradewars 2002 Scripts, Resources and Downloads 3. Open IRC chat @ irc.freenode.net:6667 #twchan 4. Parrothead wrote: Jesus wouldn't Subspace Crawl.
*** SG memorial donations via paypal to: dpocky68@booinc.com
|
| Sat Sep 03, 2011 1:21 pm |
|
 |
|
Who is online |
Users browsing this forum: No registered users and 21 guests |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum
|
|