Welcome To Darwinbots > Newbie
DB too slow?
keli:
Thanks for the support:)
Moonfisher:
If you have a dual or quad core then you should also know that DB is single threaded, so it will only run on one of them. If you want to take advantage of all your CPU's then you could probably set up a sim for each CPU with some teleporters in between them. This also has the advantage of allowing you to have different settings for each environment.
This is also why some of the older computers with a single powerfull CPU will be able to run faster sims than newer computers with several less potent CPU's.
Also judging from the source the performance for bot code excution hasn't been optimized, and generaly I think VB6 isn't the best environment for developing a program like DB once it reaches a certain size. I haven't looked at the source for the upcomming DB3, but looking at the wiki it seems like it will perform a lot better or atleast be more inviting to optimize where needed.
Numsgil:
--- Quote from: Moonfisher ---If you have a dual or quad core then you should also know that DB is single threaded, so it will only run on one of them. If you want to take advantage of all your CPU's then you could probably set up a sim for each CPU with some teleporters in between them. This also has the advantage of allowing you to have different settings for each environment.
This is also why some of the older computers with a single powerfull CPU will be able to run faster sims than newer computers with several less potent CPU's.
Also judging from the source the performance for bot code excution hasn't been optimized, and generaly I think VB6 isn't the best environment for developing a program like DB once it reaches a certain size. I haven't looked at the source for the upcomming DB3, but looking at the wiki it seems like it will perform a lot better or atleast be more inviting to optimize where needed.
--- End quote ---
VB6 has some overhead, but not as much as you might think. One of the things I've learned since working on Darwinbots is that algorithmic order (big O notation) will always outweigh any language overhead, within reason. Meaning that even if you managed to make Darwinbots 20% faster, that's a constant increase in speed and will absolutely vanish when you add another 3 bots to an already huge simulation since that's a O(n^2) environment.
So the main reason for a different language is that it's easier to program complex algorithms in C# than VB6. VB6 is just a pain to work in.
Moonfisher:
I was mostly thinking of the plands to make it object oriented and have unit tests.
A code standard would probably be a good idea too, if you can get people to follow it.
It would just make the whole thing easier to work with in the future, and a lot easier for people to dig into the source.
But mostly it makes it easy to optimize DB if it's well structured and has some good tests.
And if it's multithreaded it will perform a lot better on computers with more than one CPU.
I also agree that VB6 has some strange syntax and it can be hard to find any dokumentation... found it kind of akward to work with in general.
And it doesn't realy encourage making structured and object oriented code, and with a program the size of DB it just gets too confusing.
Navigation
[0] Message Index
[*] Previous page
Go to full version