-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[External] [stdlib] Integrate
PyObject_SetItem
for speedup and erro…
…r handling (#48447) [External] [stdlib] Integrate `PyObject_SetItem` for speedup and error handling Following the trend of: - #3549 - #3583 Again, noticing ~1.4x speedup on basic benchmarks: ```mojo for _ in range(iterations): var idx_a = random_si64(0, 999) var idx_b = random_si64(0, 9999) var idx_c = random_si64(0, 99999) a[idx_a] = idx_a b[idx_b] = idx_b c[idx_c] = idx_c ``` and improved error handling, preventing crashes. Co-authored-by: Joshua James Venter <venter.joshua@gmail.com> Closes #3595 MODULAR_ORIG_COMMIT_REV_ID: 107c0b478171f86869b7cb94e57f5ea59d83e994
- Loading branch information
1 parent
11e97c8
commit 64ef6d1
Showing
3 changed files
with
72 additions
and
18 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
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