12. A method for efficiently detecting malicious software code in a manner that reduces processing and memory utilization, the method comprising: receiving query binary code for analysis to determine if the query binary code includes malware, the query binary code being received at a computing device comprising processing circuitry and a memory configured to analyze code to detect malware; generating token sequence n-grams based on the query binary code; hashing the token sequence n-grams; partitioning samples by length to compare selected samples based on length, wherein the samples are based on the token sequence n-grams; generating, by the processing circuitry, an n-gram score using a dynamic decimation of a selected sample based on the token sequence n-grams and a plurality of reference samples, wherein the n-gram score is indicative of a similarity between the selected sample and at least one of the reference samples; and reporting, based on the n-gram score, a malware threat as an output to a user, wherein the reporting includes the n-gram score and an indication of a match between the selected sample and the at least one of the reference sample.
21. The method of claim 12 , wherein: each of the reference samples is a passage of text; and each of the test samples is a passage of text.