-
-
Notifications
You must be signed in to change notification settings - Fork 40
Conversation
had to rename benchmark to benchmarks, hope this doesn't break anything and rename benchmark.py to test_benchmark.py Tests are working fine: benchmarks can be invoked:
for some reason '100 arrays dict' - will open an issue since it is too late |
Great progress. 😊 .PHONY: test
test:
pytest tests
.PHONY: bench
bench:
pytest benchmarks
.PHONY: bench-all
bench-all:
pytest benchmarks --compare-other-engines |
benchmarks/test_benchmark.py
Outdated
'int': 100100100, | ||
'float': 100999.123456 | ||
} | ||
for x in range(256): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd prefer to have a separate block per test object.
doubles = [sys.maxsize * random.random() for x in range(256)]
unicode_strings = [ "نظام لولاية ا...رعيا لابوين عمانيين " for x in range(256)]
and so on.
The advantage would be that it's easier to reason about what the final test object might look like and adding/removing a test object just means adding/removing a block.
The disadvantage is, that there's some redundancy, but I think it's worth it.
Also, we could also extract that magic number 256 to some variable.
Here comes a result on one of my machine.
For those benchmarks we are winning, we usually have clear margin. If this number is right, I think it's impressive for a super young project 😃 |
I think it will be good to have standard library's |
In my test, we are slower than standard library's
|
although tests and benchmarks work locally, i can't make them pass in travis-ci, can someone help? |
Hum... it looks like you ran into a pytest bug. 😅 |
Thanks for this @RSabet 🎉 |
do you want something like this?