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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T20:05:57+00:00 2026-05-22T20:05:57+00:00

I guess they’re the same thing but Clojure uses the Array class to manipulate.

  • 0

I guess they’re the same thing but Clojure uses the Array class to manipulate.

Anyway, I’ve been told that in Clojure if you really need speed then you can use arrays but between the following programs the Java version is much faster

(time
 (let [data (int-array 100000000)]
   (dotimes [q 100000000]
     (aset-int data q q))))

_

public class Array{
    public static void main(String[] args){
    long start = System.currentTimeMillis();
    int[] data = new int[100000000];
    for(int q = 0;q < data.length;q++){
        data[q] = q;
    }
    System.out.println(System.currentTimeMillis() - start);
    }
}

In contrast, this Clojure program that uses the IntBuffer class is almost as fast as the Java code

(time
 (let [data (IntBuffer/allocate 100000000)]
   (dotimes [q 100000000]
     (.put data q q))))
  • 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-22T20:05:58+00:00Added an answer on May 22, 2026 at 8:05 pm

    Don’t use aset-* functions. Just use aset: (aset data q q). Don’t ask me why the aset-* functions are there. As long as I can remember their use was discouraged.

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

Sidebar

Related Questions

I don't understand the difference, they both seem the same but I guess they
My guess is that class variables (class var) are truly global in storage (that
I guess the topic says it. I have tried googling this, but havent gotten
I guess I have been using the Web Site model ever since .NET 2.0
I wonder in which language Chromium OS is written.I guess they have used C/C++
if i fire up 2 functions like this: prepare_data(); read_data(); then i guess they
So I guess they decided to update visual studio report viewer, without feeling it
I have two django sites that use the same database and share some of
I want to develop an application targeting both android and iphone. I guess they
Using class table inheritance it is recommended that the subclass refers to the superclass

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.