[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-janitors] #757: provide ##core#inline-routines for cheap SR
From: |
Chicken Trac |
Subject: |
Re: [Chicken-janitors] #757: provide ##core#inline-routines for cheap SRFI-4 vector primitives |
Date: |
Sat, 17 Dec 2011 16:49:49 -0000 |
#757: provide ##core#inline-routines for cheap SRFI-4 vector primitives
--------------------------+-------------------------------------------------
Reporter: felix | Owner: felix
Type: enhancement | Status: new
Priority: minor | Milestone:
Component: compiler | Version: 4.7.x
Resolution: | Keywords:
--------------------------+-------------------------------------------------
Description changed by felix:
Old description:
> `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);
> }}}
New description:
`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.
--
--
Ticket URL: <https://bugs.call-cc.org/ticket/757#comment:1>
Chicken Scheme <http://www.call-with-current-continuation.org/>
Chicken Scheme is a compiler for the Scheme programming language.