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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T10:47:43+00:00 2026-05-11T10:47:43+00:00

I have a Message class which parses text messages using lookup tables. I receive

  • 0

I have a Message class which parses text messages using lookup tables. I receive a lot of messages and create and destroy a lot of objects so I thought I declare those lookup tables as static members to prevent initializing the same tables with the same values again and again.

Is it the correct approach or there’s more appropriate C++ way?

Thanks.

  • 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. 2026-05-11T10:47:44+00:00Added an answer on May 11, 2026 at 10:47 am

    This sounds like the right way to do it, although I’d expect the compiler to optimize this. Have you benchmarked your application and does declaring the tables as static speed it up?

    Also note that if you have many large lookup tables, performance will increase, but the tables will be hold in memory all the time.

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

Sidebar

Ask A Question

Stats

  • Questions 68k
  • Answers 68k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer This is homework so I'm only going to give you… May 11, 2026 at 12:05 pm
  • added an answer I figured something out. Client.stub!(:named_scope).and_return(@clients = mock([Client])) @clients.stub!(:first).and_return(@client = mock(Client))… May 11, 2026 at 12:05 pm
  • added an answer I finally came up with a routine for replacing these… May 11, 2026 at 12:05 pm

Related Questions

I have a User class with reference to a Message class. The message class
I have a class that after it does some stuff, sends a JMS message.
If I have a Django form such as: class ContactForm(forms.Form): subject = forms.CharField(max_length=100) message
I have a Perl script that pops up a message box when its work
I have a variable last_login and want to output a message if the last
I have a simple message box in a WPF application that is launched as
I have a status message box (div box) positioned at the bottom of a
I have a simple GtkStatusBar created with glade,and want to add a simple message
In a Java web application I have a recurring message load of type A
I have a requirement of reading subject, sender address and message body of new

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.