Alice Community  

Go Back   Alice Community > Alice 2 > Bugs and Troubleshooting

Reply
 
Thread Tools Display Modes
Alice is too slow when executing codes!
Old
illserveu
Junior Member
 
Status: Offline
Posts: 3
Join Date: Nov 2011
Default Alice is too slow when executing codes! - 11-28-2011, 08:14 AM

I'm making Tic-Tac-Toe game, with the strategy on Wikipedia. I coded it in C# first, and it's perfect. After many hours, I ported the code to Alice successfully. However, it takes too many time to execute the code, although the loop only scan for 9 game board cells, while in C#, the CPU take not any milisecond to run.

I read a previous topic that tell Alice is slow on Windows 7. Is it really because of Windows 7?

EDIT: Here is an example: This code takes almost 5 seconds to complete!


Last edited by illserveu; 11-28-2011 at 08:20 AM.
   
Reply With Quote
Old
x2495iiii
Super Moderator
 
x2495iiii's Avatar
 
Status: Offline
Posts: 3,508
Join Date: Dec 2008
Location: Somewhere in the Continental U.S.
Default 11-28-2011, 08:27 AM

Did you make sure all the durations are set to zero or false seconds?

Yeah, the set item x to y command for lists and arrays is by default set to one second. Looped nine times, that code will take 9 seconds to execute.


(')>

Last edited by x2495iiii; 11-28-2011 at 08:31 AM.
   
Reply With Quote
Old
illserveu
Junior Member
 
Status: Offline
Posts: 3
Join Date: Nov 2011
Default 11-28-2011, 09:38 AM

Thank you very much! I didn't know about that. But isn't that... weird? I mean, it's not logistic.
   
Reply With Quote
Old
x2495iiii
Super Moderator
 
x2495iiii's Avatar
 
Status: Offline
Posts: 3,508
Join Date: Dec 2008
Location: Somewhere in the Continental U.S.
Default 11-28-2011, 11:24 AM

It is.

It's weird and silly.

But at least it's easy to fix.


(')>
   
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Copyright ©2017, Carnegie Mellon University
Alice 2.x 1999-2012, Alice 3.x 2008-2012, Carnegie Mellon University. All rights reserved.