The most performant approach would be to store the columns as vectors in a 
tuple or immutable. DataFrames can be nearly as performant if you:

- Extract columns (df[:mycol]) and index into them whenever possible 
instead of indexing individual elements (df[1, :mycol])
- Add typeasserts when you perform indexing operations 
(df[:mycol]::Vector{Int}), or pass the columns to another function

Otherwise you will incur a slowdown because the compiler doesn't know the 
types.

Simon

On Thursday, April 17, 2014 5:34:24 PM UTC-4, John Myles White wrote:
>
> It's actually possible to place pure Julia vectors in a DataFrame, which 
> might be convenient in this case. But you could always just store the 
> columns in a Vector{Any}, which is what the DataFrame does behind the 
> scenes anyway.
>
>  -- John
>
> On Apr 17, 2014, at 2:27 PM, Stefan Karpinski 
> <[email protected]<javascript:>> 
> wrote:
>
> A DataFrame does seem like a good option, but those have NA support that 
> you may not need. Can you elaborate a little more on the use case? Is it a 
> fixed set of column names and types? Or will you need to support different 
> schemas?
>
>
> On Thu, Apr 17, 2014 at 5:16 PM, Stéphane Laurent 
> <[email protected]<javascript:>
> > wrote:
>
>> Hello,
>>
>>  I need to deal with some objects represented as arrays whose some 
>> columns are BigFloat, some columns are Int, some columns are logical. Is it 
>> a good idea to use a DataFrame ? Is there a better solution ?This is for a 
>> computationally intensive program.
>>
>
>
>

Reply via email to