REBOL 3.0

Those restless natives...

Carl Sassenrath, CTO
REBOL Technologies
16-Mar-2007 16:37 GMT

Article #0067
Main page || Index || Prior Article [0066] || Next Article [0068] || 16 Comments || Send feedback

One of the changes in R3 is that some of the more frequently used mezzanines are becoming native.

The append function is an example.

If I time the loop:

a: make string! 10000
loop 1000 [
    clear a
    loop 10000 [append a "x"]
]

It takes 15.3 seconds in R2, and 2.9 seconds in R3. So, about 500 percent faster in R3.

Here's the autodoc for the new append:

USAGE:
    APPEND series value /part length /only /dup count 

DESCRIPTION:
     Inserts a value at tail of series and returns the series at head. (Modifies)
     APPEND is an action value.

ARGUMENTS:
     series -- Series at point to insert (Type: series! gob! port! object! bitset! typeset!)
     value -- The value to insert (Type: any-type!)

REFINEMENTS:
     /part -- Limits to a given length or position
         length -- (Type: number! series! port! pair!)
     /only -- Inserts a series as a series
     /dup -- Duplicates the insert a specified number of times
         count -- (Type: number! pair!)
Tell me...

If you have a mezzanine that needs to be a native, please let me know. (No promises, but I will consider it.)

16 Comments

REBOL 3.0
Updated 18-Apr-2024 - Edit - Copyright REBOL Technologies - REBOL.net