Coder Social home page Coder Social logo

Comments (5)

steveyen avatar steveyen commented on August 16, 2024 1

hehe, indeed! that's why i shouldn't be in accounting :-)

from moss.

steveyen avatar steveyen commented on August 16, 2024

A related thought is if that if the max key-len in a segment is less than 24-bits, then perhaps those bits can also be used for other purposes, like the above idea to reference a buf.

from moss.

mschoch avatar mschoch commented on August 16, 2024

Before you go spending bits we don't have, my understanding is that we only have 8 bits left over.

64 - data offset
4 - opteration type
24 - key len
28 - val len
8 - reserved

Also those 8 reserved bits are not contiguous, 4 are near the operation and 4 are near the value len.

from moss.

hisundar avatar hisundar commented on August 16, 2024

The kvs/index arrays can only be merged when there are no key space overlaps right?

from moss.

steveyen avatar steveyen commented on August 16, 2024

The kvs/index arrays can only be merged when there are no key space overlaps right?

Hi, unless I'm too pre-coffee about this, I'm thinking they can be merged, even when there are overlaps. That is, a kvs entry currently has info like this...

op, bufOffset, keyLen, valLen

And the proposal is to add one more thing, like...

op, bufIdx, bufOffset, keyLen, valLen

The bufIdx would tell us which buf to use.

That way, at read time, there's less binary searching... that is, currently, moss will binary search through multiple kvs arrays as it moves down through the segment stack. Instead, it would just binary search through a single kvs array (which refers to multiple buf's).

One wrinkle (related to my lack ability to account correctly) is w.r.t. how many bits we can afford to give to a bufIdx field.

from moss.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.