Ticket #2027 (closed todo: wontfix)

Opened 3 years ago

Last modified 3 years ago

Deprecate hashvalue vtable

Reported by: dukeleto Owned by:
Priority: normal Milestone:
Component: core Version: 3.1.0
Severity: medium Keywords:
Cc: Language:
Patch status: Platform: all

Description

The hashvalue VTABLE is unused in Parrot core and has no tests, until I added some in the t/src/extend_vtable.t file as part of my TPF grant to improve the docs/tests of our embed/extend system.

It has been added to api.yaml and will be eligible for removal in 3.6.

Change History

Changed 3 years ago by bacek

Hello.

-1 from. I'm pretty sure it's used. I've implemented it to support PMC keys in Hashes. Currently it's defained only in Default PMC as fallback, but any HLLs can provide own hashing functions.

-- Bacek

Changed 3 years ago by luben

VTABLE_hashvalue it is used in the hash-tables. When using PMC keys we get PMC's hashvalue. Every PMC could override the default implementation in order to provide faster or more appropriate hashing.

In short run, removing hashvalue vtable will give us more speed (because of less indirection) but also less flexibility. In long run, it will stop some optimizations - every PMC knows what represents best its identity and how most efficiently to calculate a hashvalues if itself.

Changed 3 years ago by nwellnhof

This VTABLE function is absolutely crucial. How are PMCs supposed to define their own hashvalue implementations without it?

Changed 3 years ago by dukeleto

If it is crucial, shouldn't we have a test for it? Am I missing something, or is this not tested?

Changed 3 years ago by bacek

Hello.

t/pm/hash.t, pmc_keys sub. Not comprehensive though.

-- Bacek.

Changed 3 years ago by bacek

Hello.

It's comprehensive now :)

-- Bacek

Changed 3 years ago by dukeleto

  • status changed from new to closed
  • resolution set to wontfix
Note: See TracTickets for help on using tickets.