Memory hierarchies since the 1990s have broadened the relevance of 1970s
practical wisdom for disk storage. A solid hash table with locality and solid
B-Tree often win today. A great stdlib should have both.
A more obscure bonus of a B-Tree (when compared to, say, balanced binary trees)
is
Ah right, indeed. Well let's say that it's a non-supported use case shrugs and
that Arraymancer tensors are the wrong container for that. I'm not aware of any
scientific/numerical computing situation with an operation depends not only on
the tensor size but also the value of what is wrapped.
> No. It means that the object gains a type header that allows for dynamic
> dispatch, RTTI, and such.
@Jehan Thank you for pointing that out! I thought the {.inheritable.} pragma
was the solution to my question, but if it adds a "dynamic dispatch" pointer to
the object, than I cannot use it.
@mratsim No, it's not. That's why I asked whenever you use dynamic scheduling.
Imagine you have a sequence of 1, 2, 4, 8, ..., 1048576. Now, map it with an
operation with O(N) complexity, where N is the value of your number. If you use
static scheduling, it's entirely possible most of the work
My name is Ethards Daisy. I come from New York. I have just registered a acount
on this forums. I’m very glad to make friends with everyone. I hope we will
help and share together about our knowledge and experiences on this forum. I
wish this forum will grow and develop in the future. Have a
> Does the {.inheritable.} pragma convert an object into a pointer or keep it
> as a normal object with copy semantics?
No. It means that the object gains a type header that allows for dynamic
dispatch, RTTI, and such.
> Should the compiler warn that putting an Obj2 into a seq of Obj1 will
@coffeepot I _think_ what you pointed out is _by design_. This is also how I
would expect it to work. OTOH, I guess a compiler warning in the first case
would be good.
Does the {.inheritable.} pragma convert an object into a pointer or keep it as
a normal object with copy semantics?
Also, something to bear in mind, upon testing this it seems the type is erased
when inserting into a seq: (Nim version 0.17.3 2017-10-13)
import typetraits
Buffered sockets don't work with UDP due to the way that UDP works. Buffering
only works with streaming sockets. If you need per-client buffering of data,
you need to implement that yourself by determining how to represent each client.
Oh, well, too bad this proc doesn't support buffered sockets.
10 matches
Mail list logo