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


Ignore:
Timestamp:
Apr 24, 2024, 12:13:36 PM (7 months ago)
Author:
Simon Charette

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #35399, comment 4

    v1 v2  
    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))` instead and you should see a slowdown.
     5Try running them with assignments of `F("scans_in") + Value(random.randint(0, m), output_field=InterField())` 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