1. A system comprising: a Field Programmable Gate Array (FPGA) provided on a substrate; a memory connected to the substrate and the FPGA; an interface for connecting the FPGA to a computing device; and a relevance-ranking algorithm for documents implemented at least in part by the FPGA, the FPGA configured to generate a result of the relevance-ranking algorithm based at least in part on the FPGA building an integral histogram based at least in part on feature values corresponding to one or more terms in one or more of the documents included in training data associated with the relevance-ranking algorithm.