Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: speed up question and answer history with a cython pxd (#1234)
- Loading branch information
Showing
8 changed files
with
63 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import cython | ||
|
||
|
||
cdef cython.double _DUPLICATE_QUESTION_INTERVAL | ||
|
||
cdef class QuestionHistory: | ||
|
||
cdef cython.dict _history | ||
|
||
|
||
@cython.locals(than=cython.double, previous_question=cython.tuple, previous_known_answers=cython.set) | ||
cpdef suppresses(self, object question, cython.double now, cython.set known_answers) | ||
|
||
|
||
@cython.locals(than=cython.double, now_known_answers=cython.tuple) | ||
cpdef async_expire(self, cython.double now) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters