| Viewing Single Post From: Brute Forcing The Adfgvx Cipher | |
|---|---|
| jdege | May 15 2008, 01:23 AM |
|
Elite member
![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
I don't think you're going to see much room for optimization in the code you have so far. It'll be your test routines that will be the pace where I'd expect most of your time to be spent. And there, I'd expect two places where optimization might pay off. 1. How you access the statistics. 2. What sort of math you do on the statistics. And in truth, I don't see much room for improvement in 1. You plan on matching 2-grams, or maybe 4-grams? Both are small enough to keep in a non-sparse array, there isn't anything that's faster than array lookup. As for 2? Use integers, instead of floats. Add logarithms instead of multiplying, etc. Lot's of possibilities. But my real advice? Use a profiling tool. No point in optimizing where your program isn't spending any time. And remember - premature optimization is the root of all evil. |
| When cryptography is outlawed, bayl bhgynjf jvyy unir cevinpl. | |
![]() |
|
| Brute Forcing The Adfgvx Cipher · General | |




![]](http://209.85.122.85/static/1/pip_r.png)


2:16 PM Nov 28