Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8491285
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T22:22:32+00:00 2026-06-10T22:22:32+00:00

I often read that linked list data structure and its variant skiplists are cache

  • 0

I often read that linked list data structure and its variant skiplists are cache friendly in parallel hardware. What does this mean ? Can some one please explain in an easy to understand way .

Edit: The context is in this link .

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T22:22:34+00:00Added an answer on June 10, 2026 at 10:22 pm

    I often read that linked list data structure and its variant skiplists are cache friendly

    linked list and similar structures are NOT CPU cache friendly because each node can be randomly arranged in memory resulting in many cache misses.

    An ArrayList by comparison will have all its references sequentially in memory so when a cache line is read in (typically 64 byte long) this can read in 16 references at once.

    Note: The objects the List refers to can still be arranged randomly in memory, something you have no control over. 😐


    From the article in the question.

    Besides being well suited for concurrent traversal and update, linked lists also are cache-friendly on parallel hardware. When one thread removes a node, for example, the only memory that needs to be transferred to every other core that subsequently reads the list is the memory containing the two adjacent nodes.

    What this is talking about is that a linked list when modified by multiple threads at once (something LinkedList in Java doesn’t support) only the nodes of the list which are modified need to be made cache consistent. By comparison if you remove or add an element in the middle or start of an ArrayList, you need to update all the references. Give this is known to be inefficient, its best avoided in any case.

    The closest example to this in Java is ConcurrentLinkedQueue which supports concurrent adding and removing. The problem is that any benefit you might gain by being able to update the start and the end in terms of the cache is lost by the fact that this action creates garbage which is much more significant, though still not very significant.

    If you use an ArrayBlockingQueue you get better cache and garbage behaviour as the references are continuous in memory, don’t require shuffling down like ArrayList and don’t create garbage to add an entries. (Unfortunately take() creates an object 😛 )

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've often read that in the Sun JVM short-lived objects (relatively new objects) can
i know that everything is going through the controller. but i often read articles
I often read that unique_ptr would be preferred in most situations over shared_ptr because
Background So I read that often memory leaks within Swing applications originate from the
Often when reading about Tcl (e.g. http://antirez.com/articoli/tclmisunderstood.html ) you read that everything is a
I am using GLib's doubly linked list structure, GList. I would like to know
I often read that one purpose of a VIEW is security: to allow some
I've often read that it's bad from a perf perspective that branching, kind of
I have a string of data which will often read like this: 0010, 0010,
I've often read that corporations will save millions once Internet Explorer 6 is finally

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.