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 6084907
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T11:34:43+00:00 2026-05-23T11:34:43+00:00

I want to create a fixed length circular buffer of some general type in

  • 0

I want to create a fixed length circular buffer of some general type in Haskell. The items in the buffer need to be located one after another in physical memory (not linked list). I want this specific structure because it will improve the chances of all the data getting to the L2 cache on the CPU together. I have read about how Haskell allows for new data types, however it looks like types created using “data” are little more that glorified c structs with pattern matching and associated methods. Is it possible to create low level data structures like the one described above completely in Haskell.

  • 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-05-23T11:34:43+00:00Added an answer on May 23, 2026 at 11:34 am

    You want a mutable array-like structure, and you particularly want an unboxed one so that the underlying array stores not only pointers to your data, but the items themselves.

    Data.Array from the standard array library gives you a version of that, but especially high-performance arrays are available from the vector library: http://hackage.haskell.org/package/vector

    The vector library, like ByteString, Text, and a few others, uses a fair amount of low-level ghc-specific primitives under the hood. To just use the library, you shouldn’t have to worry about such things yourself. But if you decide that the library doesn’t give you what you need, then you can also learn a fair amount in the way of tricks and techniques by reading through its source code for yourself.

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

Sidebar

Related Questions

I want to create a fixed layout that displays some images. for example, a
I want to create UIBarButtonItems programmatically and place these fixed space items between buttons.
I want to create a mutli dimensional array without a fixed size. I need
I want to create fixed status bar in by web form to display various
I want to create a webpart programmatically like below to contain fixed links to
I want to create a simple http proxy server that does some very basic
I want to create a search bar like one in this page http://dl.dropbox.com/u/333492/search/form.html If
I have vector of strings and want to create a fixed with string out
I want to create a text box with a fixed width that will fit
I want to create a fixed container that attaches to the top of the

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.