Construct2 blocks VS Javascript logic speed

For developers using the Construct 2 Javascript SDK

Post » Sun Feb 16, 2014 2:28 pm

Do you think that a well-optimized algorithm, written with Construct2 logic blocks, which takes about 7 seconds (on a PC) to find all the possible words in a table of letters of size 4x4 fro a vocabulary of about 60.000, can significantly improve rewritten directly in the form of Javascript Plugin?
Thanks in advance for any opinions !
B
5
S
1
Posts: 4
Reputation: 433

Post » Sun Feb 16, 2014 4:35 pm

Nope, unless the events aren't that a well-optimized.

I'd suggest using different lists, based on consonant, vowel, consonant.
Image ImageImage
B
168
S
50
G
164
Posts: 8,236
Reputation: 105,591

Post » Sun Feb 16, 2014 10:16 pm

It could be faster, but you'll get more of a speed improvement by reworking the algorithm used.

With a 15x15 grid of letters I can get it to find all possible words from a 60k word list in about 0.6 seconds. The biggest speedup is from loading the word list into a dictionary object which allows you to know if a word is in it with the "has key" condition.
B
91
S
31
G
103
Posts: 5,238
Reputation: 67,762


Return to Javascript SDK

Who is online

Users browsing this forum: norman74 and 0 guests