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

  • SEARCH
  • Home
  • 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 8433115
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T06:17:58+00:00 2026-06-10T06:17:58+00:00

Is there anything to be gained memorywise and speedwise by having shorter variable-names in

  • 0

Is there anything to be gained memorywise and speedwise by having shorter variable-names in a language like python?

And if so, what kind of situations would it be reasonable to consider this?

Note

I’m in no way advocating short variable names, I’m just wondering, please (re)read the question.

Note 2
Please, I do understand the value of descriptive variable names. I’ve looked at enough code to prefer descriptive names over shorter names, and understand the value of it. A plain No doesn’t really help.

  • 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-10T06:18:00+00:00Added an answer on June 10, 2026 at 6:18 am

    There’s a problem with “like python”, because not all interpreted languages are the same.

    With a purely-interpreted language it would have more of an impact than with one like Python that has a pre-compile step. Strictly this isn’t a language difference (you could have one Javascript engine that precompiles, and one that doesn’t), but it does affect the answer to this question.

    Stretching out “like python” to include every interpreted language, I’d say the answer is “yes, for some of them, at least some of the time”. The next question is, “how much”.

    In 1997 through to early 1998 I was working on some rather complicated javascript code that made use of some of the new features of Netscape Navigator 4 and Internet Explorer 4. This was a humongous javascript file for the time – when the prevalence of dial-up meant that every kilobyte counted in terms of site speed.

    For this reason, we used a minimiser script. The main thing this did, was to re-write variables to be shorter (lastHeight becomes a, userSel becmomes b and so on).

    Not only did it reduce the download time, but it did also make one of the heavier functions appreciably faster. But only appreciable if you were someone who spent their whole working day looking at nothing else, which pretty much meant me and one other colleague.

    So yes, if we put Javascript into the “like python” category as far as interpretation goes, then it can make a difference, under the following conditions:

    1. It was running on Pentium, Pentium Pro and 486s (Pentium II was out then, but we didn’t have any). I got a new machine part-way through the project, which meant I went from 133MHz to 166MHz.
    2. It was a rather large piece of nasty looping (most of the script had no appreciable difference).
    3. It was running on a script-engine from 15years ago with none of the improvements in script-engine performance that have been made since.

    And it still didn’t make that much difference.

    We can assume for that, that some other interpreted languages are also affected to a similarly minute degree.

    Even in 1997 though, I wouldn’t have bothered were it not that it coincidentally gave me another advantage, and I certainly wasn’t working on the minimised version.

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

Sidebar

Related Questions

Is there anything like this outside of the application delegate? I would just like
Is there anything in Python that works like the final keyword in Java -
Is there anything like a session ID that prevents the same session for having
Is there anything for Python that has concurrency like Erlang does, particulary transparent actors
Is there anything like asp.net transactions in Android SQLite? I am doing some processing
Is there anything in Python akin to Java's JLS or C#'s spec?
Is there anything in Java that implements something like the following interface MSet<T> extends
Is there anything wrong with having an asp.net page throw a (custom error) if
Is there anything like Beanshell, which exposes CLR classes instead of Java classes, and
Is there anything similar to a slice.contains(object) method in Go without having to do

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.