Opened 7 years ago

Closed 6 weeks ago

#757 closed enhancement (fixed)

provide ##core#inline-routines for cheap SRFI-4 vector primitives

Reported by: felix Owned by: felix
Priority: minor Milestone: 5.1
Component: compiler Version: 4.7.x
Keywords: Cc:
Estimated difficulty: medium

Description (last modified by felix)

XXXvector-length, XXXvector-ref and XXXvector-set! would be much more efficient if routines callable via ##core#inline[_allocate] would be available for them (just as it currently is for, say, vector-ref). Since the structure-tag is not available in the C runtime, it has to be explicitly passed, e.g.

C_word C_i_XXXvector_ref(C_word tag, C_word vec, C_word index);
C_word C_i_XXXvector_set(C_word tag, C_word vec, C_word index, C_word x);
C_word C_i_XXXvector_length(C_word tag, C_word vec);

(need allocating ..._ref for f64/s32/u32 vector)

Note that the existing C_a_i_f64/S32/u32vector_ref are incorrectly named and should be C_u_a_i_... or something similar.

Change History (7)

comment:1 Changed 7 years ago by felix

  • Description modified (diff)

comment:2 Changed 7 years ago by felix

Note: renaming C_a_i_XXXvector_ref and friends will require updating the names in unboxing.scm.

comment:3 Changed 3 years ago by sjamaan

  • Milestone set to 5.1

Putting it on the roadmap, tentatively for 5.1

comment:4 Changed 3 years ago by sjamaan

We could also simply make the tags available in a global variable, like we do (or did) for the extended numeric types and the error-hook. This would be slightly more flexible, for example if we changed the representation to have a dedicated custom type.

Last edited 3 years ago by sjamaan (previous) (diff)

comment:5 Changed 3 years ago by sjamaan

  • Estimated difficulty set to medium

comment:6 Changed 7 weeks ago by sjamaan

  • Milestone changed from 5.1 to 5.2

Getting ready for 5.1, moving tickets which won't make it in to 5.2.

comment:7 Changed 6 weeks ago by sjamaan

  • Milestone changed from 5.2 to 5.1
  • Resolution set to fixed
  • Status changed from new to closed

Implemented with ea10de3

Note: See TracTickets for help on using tickets.