38,137 reputation
3102195
bio website mathprogramming-intro.org
location St. Petersburg, Russia
age 36
visits member for 1 year, 4 months
seen 17 mins ago
stats profile views 3,101

Ok, an obligatory note: opinions expressed here are mine and not those of my employer.


May
10
revised How can I use Mathematica's graph functions to cheat at Boggle?
Fixed the performance problem, and left a notice for the reason
May
10
comment ListPlot: Plotting large data fast
Very cool and informative - big +1.
May
10
comment How can I use Mathematica's graph functions to cheat at Boggle?
@Pillsy Your assumption is probably right in general, but you did not account for the huge overhead of top-level mma. Here, I reduce it to a mimimum, and I think this is a good illustration of what immutable data structures can buy you. Both the list of already visited vertices (vvlist parameter of f), and a given (sub) tree, only contain one or just a few pointers to be copied. So, my recursive function is maximally efficient, because it copies very little. Also, I don't have to build words from letters - it is a waste for this problem, where just a single last letter is always important.
May
10
revised How can I use Mathematica's graph functions to cheat at Boggle?
Fixed the wrong function name
May
10
comment How can I use Mathematica's graph functions to cheat at Boggle?
@rcollyer Thanks for the notice. getWords was a previous incarnation of getVertexSequences. They are exactly the same, I just renamed the former to the latter. Since both were defined in the workspace, I did not notice that in my tests / benchmarks. Will edit now. As for "a little while", yes, 6s. is about right, so for a single run, my solution is not really fast. But, for many runs, this will matter less, and besides, this dictionary tree can be stored in e.g. .mx file, since it may ba also useful for other applications. We only have to build it once.
May
9
revised How can I use Mathematica's graph functions to cheat at Boggle?
Added a link, fixed a typo
May
9
answered How can I use Mathematica's graph functions to cheat at Boggle?
May
9
comment Problem using OptionValue with functions defined by SubValues, and the use of Options for function dispatch
@rcollyer That's a good point. Care to edit my answer and include it, or do you want me to do this?
May
9
awarded  Nice Answer
May
8
comment Are there guidelines for avoiding the unpacking of a packed array?
@Yu-SungChang Thanks, I was not aware of these details. Makes perfect sense.
May
7
comment Are there guidelines for avoiding the unpacking of a packed array?
@Mr.Wizard Thanks for the upvote:). I voted for you answer too.
May
7
awarded  Nice Answer
May
7
revised Are there guidelines for avoiding the unpacking of a packed array?
corrected a typo
May
7
revised Are there guidelines for avoiding the unpacking of a packed array?
Added some suggestions
May
7
revised Are there guidelines for avoiding the unpacking of a packed array?
added 44 characters in body
May
7
answered Are there guidelines for avoiding the unpacking of a packed array?
May
6
comment Combining lists
@rcollyer Yep, he does. Anything that uses Apply on packed arrays, will unpack.
May
6
comment Combining lists
@rcollyer One problem with this is that it will unpack both lists if they were packed.
May
6
comment Why doesn't Evaluate appear to work in this RegionPlot example with MatchQ?
Evaluate overrides only Hold-attributes of heads immediately enclosing it, but you have another layer here (MatchQ). This discussion might help.
May
6
comment How to read data file quickly?
@AlbertRetey Thanks, a very good point!