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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T10:29:39+00:00 2026-05-30T10:29:39+00:00

When dealing with both ints and floats in SSE (AVX) is it a good

  • 0

When dealing with both ints and floats in SSE (AVX) is it a good practice to convert all ints to floats and work only with floats?
Because we need only a few SIMD instructions after that, and all we need to use is addition and compare instructions (<, <=, ==) which this conversion, I hope, should retain completely.

  • 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-30T10:29:41+00:00Added an answer on May 30, 2026 at 10:29 am

    Expand my comments into an answer.

    Basically you weighing the following trade-off:

    Stick with integer:

    • Integer SSE is low-latency, high throughput. (dual issue on Sandy Bridge)
    • Limited to 128-bit SIMD width.

    Convert to floating-point:

    • Benefit from 256-bit AVX.
    • Higher latencies, and only single-issue addition/subtraction (on Sandy Bridge)
    • Incurs initial conversion overhead.
    • Restricts input to those that fit into a float without precision loss.

    I’d say stick with integer for now. If you don’t want to duplicate code with the float versions, then that’s your call.

    The only times I’ve seen where emulating integers with floating-point becomes faster are when you have to do divisions.


    Note that I’ve made no mention of readability as diving into manual vectorization probably implies that performance is more important.

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

Sidebar

Related Questions

I am dealing with a clinical application that uses both base and derived units
When dealing with a single file, I'm used to: /blah do some work n
I am dealing with a table that contains both cars and owners (table CO
I have a use cases where I will be dealing with both local file
I'm building an application (both client and sever sides) that may need to send
I am dealing with a content editable div and I need to deal with
When dealing with objects that require data known only at runtime, such as a
I am dealing with an API that only lets me access data by month.
Good evening. This code works. It sorts an array of cards by both Suit
Recently I'm dealing with the access log of nginx analyzing work with python. I've

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.