MathGroup Archive 1996

[Date Index] [Thread Index] [Author Index]

Search the Archive

Compression Algorithm wanted


I have the following problem:

A compiled function of mine does frequent writes to a list, constantly churning
out new integers within a certain range. Unfortunately, writing to lists from 
inside a compiled function is very slow, so, naturally, I want to reduce the
number of writes. Currently, I am using a method to reduce writes by
expressing consecutive numbers as the digits of an integer (eg. {1,2,3} becomes
123).

Does anyone have a method to "compress" the list of integers, or reduce the
number of writes in any way?

Any help is appreciated. Thanks in advance.

--Jonathan Lee

==== [MESSAGE SEPARATOR] ====


  • Prev by Date: differential equation
  • Next by Date: Replacement
  • Previous by thread: Re: graphs to postscript
  • Next by thread: DInterpolatingFunction.m