Changes between Version 2 and Version 3 of Ticket #35399, comment 4


Ignore:
Timestamp:
Apr 24, 2024, 12:14:31 PM (3 weeks ago)
Author:
Simon Charette

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #35399, comment 4

    v2 v3  
    33In other words `int.__hash__` is pretty fast but `Expression.__hash__` isn't and you need to perform an implicit one to gather values in `defaultdict(list)`. Since `bulk_update` support both expressions and literal assignment the benchmark must be run against both to be representative.
    44
    5 Try running them with assignments of `F("scans_in") + Value(random.randint(0, m), output_field=InterField())` instead and you should see a slowdown.
     5Try running them with assignments of `F("scans_in") + Value(random.randint(0, m), output_field=IntegerField())` instead and you should see a slowdown.
    66
    77The need for _hashability_ also poses another problem. What should be done with values that are not hashable such as `JSONField` assignment of `dict`s?
Back to Top