[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/functions.php on line 4586: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3765)
[phpBB Debug] PHP Warning: in file /includes/functions.php on line 4588: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3765)
[phpBB Debug] PHP Warning: in file /includes/functions.php on line 4589: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3765)
[phpBB Debug] PHP Warning: in file /includes/functions.php on line 4590: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3765)
AI Challenge Forums • View topic - C# Poll: Do you want your bot to get 50% to 200% faster?

It is currently Fri Jul 28, 2017 7:00 pm Advanced search

C# Poll: Do you want your bot to get 50% to 200% faster?

New Language? Want more libraries? Post Here.

C# Poll: Do you want the C# compiler to --Optimize=All to speed execution?

Yes, faster the better!
23
82%
No
5
18%
 
Total votes : 28

C# Poll: Do you want your bot to get 50% to 200% faster?

Postby LouisMartin » Sun Nov 13, 2011 12:52 am

The contest server isn't current compiling our C# code with optimization switch on. (--Optimize=all)
After some benchmarking, I see speed increases between 50% to 1000%.
Without changing a single line of code, I see most 300+ ms turning into 30-75ms and even some (peaking) 500+ ms tamed into ~30 ms. My mean speed improvement is 300% under 150 ants and 150% at 250+ ants.

As chances of breaking anything are abysmal - to not say non-existant - this is free lunch.
This makes C# more apt at competing against C/C++ native compilation.
Have you had timeouts and have no idea why it happens at that specific time?
None optimized managed code depending on garbage collection capricious (almost random) timing is a nightmare when dealing in milliseconds. It may not affect your traditional "Line of business application", but realtime apps like our bots need more predictability; --Optimize=all helps with that too.

The organizers are ready to add the switch to the compilation if I get some people to support the idea.

Anyone supporting the motion?
LouisMartin
Cadet
 
Posts: 3
Joined: Fri Nov 04, 2011 9:32 pm

Re: C# Poll: Do you want your bot to get 50% to 200% faster?

Postby amstan » Sun Nov 13, 2011 4:54 am

Loaded question warning. :P

From my experience with gcc and C optimizations. The highest level of optimizations can sometimes produce worse code than a medium level for example. This might not be the case for C#, but it's worth looking into.

Also, keep in mind that a higher optimization setting might produce a longer compile time. That means the worker will spend more time compiling and less time playing games, giving a lower gpm. So there's that tradeoff.

I'm not saying i'm opposed to it, but don't just vote yes if you're not sure.
Alexandru M. Stan
Contest Organizer
User avatar
amstan
Contest Organizer
 
Posts: 691
Joined: Sun Jan 31, 2010 4:02 am
Location: Stoney Creek, Ontario

Re: C# Poll: Do you want your bot to get 50% to 200% faster?

Postby frobalt » Sun Nov 13, 2011 12:48 pm

With my vote for yes the votes are tied.
frobalt
Colonel
 
Posts: 53
Joined: Mon Oct 31, 2011 9:42 pm

Re: C# Poll: Do you want your bot to get 50% to 200% faster?

Postby mac » Sun Nov 13, 2011 3:48 pm

From a python-based-bot perspective I would say: if your C# bot needs optimised compilation not to time out, then you are probably doing it wrong! ;) If it is just for the sake of running it faster, I would say it's not worth it as - if my understanding is correct - bots taking part into the same game works in parallel, so the turn will be over only when the slowest of them will be done.

Given the many frequent complains about low game ratios, I would let the servers work on something bringing benefits to a wider audience... C# bots amount to 10% of the entries, if I read correctly the rankings.
mac
Brigadier-General
 
Posts: 151
Joined: Mon Oct 31, 2011 6:39 am

Re: C# Poll: Do you want your bot to get 50% to 200% faster?

Postby ProperChaos » Sun Nov 13, 2011 4:47 pm

Do note that compile times for C# are relatively small in comparison with C/C++. Compiling my current bot takes less than a second with all optimisations enabled and I certainly don't have a fast pc. Of course if your bot times out right now this is probably due to a design flaw and not a language issue, but the optimisations do give C# the opportunity to compete with C/C++ bots in terms of speed/performance.

Voted yes :)
ProperChaos
Cadet
 
Posts: 1
Joined: Sun Nov 13, 2011 4:43 pm

Re: C# Poll: Do you want your bot to get 50% to 200% faster?

Postby Parasprites » Sun Nov 13, 2011 4:54 pm

Is compilation really a significant fraction of server worker load? I find it hard to beleive that people submit new bots in a compiled language frequently enough to make a difference.
Parasprites
Major-General
 
Posts: 224
Joined: Mon Oct 24, 2011 3:08 pm

Re: C# Poll: Do you want your bot to get 50% to 200% faster?

Postby amstan » Sun Nov 13, 2011 8:55 pm

Alexandru M. Stan
Contest Organizer
User avatar
amstan
Contest Organizer
 
Posts: 691
Joined: Sun Jan 31, 2010 4:02 am
Location: Stoney Creek, Ontario

Re: C# Poll: Do you want your bot to get 50% to 200% faster?

Postby Tortortor » Sun Nov 13, 2011 10:12 pm

Hi all

From my point of view the goal of this conquest is to find the best algorithm, doesn't matter on language. As some languages have to be precompiled, they already have some handicap to interpreted languages. So we shouldn't try to speedup the languages, which are "in the middle". We are (conquest organizators?) should try to minimize the difference in 1000ms for most quickly language and 1000ms for most slower one.
Tortortor
Major
 
Posts: 37
Joined: Fri Oct 21, 2011 12:10 pm

Re: C# Poll: Do you want your bot to get 50% to 200% faster?

Postby athena » Mon Nov 14, 2011 1:05 am

I was wondering whether this option was turned on. I'm definitely in favor of enabling this switch, since it is a free performance boost to all C# uploads. I know that Microsoft's compiler does a really good job of compiling fast and producing really nice performance for the applications. I assume that Mono is not quite as good, but still. Everything counts.

I find myself using several advanced data structures to gain every bit of performance, and yet I find my bots wanting to do more work than they have time for. Every single action is a trade-off between more functionality and optimality vs faster running times. The less functionality and optimality we have to cut away the better we will perform in the final rankings.
User avatar
athena
Lieutenant-Colonel
 
Posts: 41
Joined: Wed Sep 29, 2010 10:37 pm
Location: Copenhagen, Denmark

Re: C# Poll: Do you want your bot to get 50% to 200% faster?

Postby ronnyk » Sat Nov 19, 2011 2:40 pm

I'm wondering whether this motion will pass? I'm having a hard time with timeouts, was hoping that this might help ;)
ronnyk
Cadet
 
Posts: 5
Joined: Sun Nov 13, 2011 3:11 pm

Next

Return to Language Support

Who is online

Users browsing this forum: No registered users and 1 guest

cron