N could equal 1 under circumstances that make T small enough or d large
enough. T might be small for a tiny collection, or d large for a large
collection. Access pattern might matter, too. If a particular sequence of
inserts causes a lot of worst-case tree rotations or something, say, maybe
it could make the next insert particularly expensive to perform, but only
for a persistent collection. I'd have to dig into the actual implementation
to be more certain.

I'd expect that N will be greater than 1 for all but fairly atypical
circumstances, though, which fits with a few observations of transients
being faster for a tiny number of operations and many observations of
transients not being faster for a tiny number of operations.



On Fri, Nov 9, 2012 at 10:12 AM, Jim foo.bar <jimpil1...@gmail.com> wrote:

> exactly the point I was trying to make! However, other peoples' experiment
> seem not to agree with that!
>
> Jim
>
>
>
> On 09/11/12 15:09, Cedric Greevey wrote:
>
>> In the real world, it's more complicated than that, and N could end up
>> not only depending on which transient operations and on vector vs. map but
>> even on details of the system hardware, Clojure version, and JVM version.
>> However it's likely to be a small integer in every case, so if you're doing
>> dozens or hundreds or more of operations, transients will generally help,
>> and if you're only doing one or two, don't bother.
>>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscribe@**googlegroups.com<clojure%2bunsubscr...@googlegroups.com>
> For more options, visit this group at
> http://groups.google.com/**group/clojure?hl=en<http://groups.google.com/group/clojure?hl=en>
>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to