Skip to content

Commit

Permalink
[MINOR] JIT optimize LibMatrixBinCell
Browse files Browse the repository at this point in the history
This commit move some of the code inside LibMatrixBincell around to
encourage jit compilation of some methods. In specific folloing methods
have been introduced.

- safeBinaryMvSparseRowVector
- fillZeroValuesEmpty
- fillZeroValuesDense
- fillZeroValuesSparse
- safeBinaryMMDenseDenseDensePM_Vec (Plus Multiply kernel vectorized)
- safeBinaryMMDenseDenseDensePM     (Plus Multiply kernel small input)
- safeBinaryMMDenseDenseDenseContiguous (This one makes a big difference)
- safeBinaryMMDenseDenseDenseGeneric

In specific the safeBinaryMMDenseDenseDenseContiguous,
safeBinaryMMDenseDenseDensePMm and safeBinaryMMDenseDenseDensePM_Vec
improve the performance by much.

In LM_cg the performance:
Stats output:

 +*  3.123   3000 (Before)
 +*  1.991   3000 (After)

 +   1.125   2021 (Before)
 +   0.703   2015 (After)

This is training on Criteo 100k rows.
  • Loading branch information
Baunsgaard committed Oct 31, 2023
1 parent 798a0df commit 2b8de16
Show file tree
Hide file tree
Showing 2 changed files with 269 additions and 163 deletions.
Loading

0 comments on commit 2b8de16

Please sign in to comment.