Jump to content
  • 0

vstudio 2005 optimize small things?


Question

Posted (edited)

i have this code set up on vsd 2005, thefore i cannot find it into IDA  the function sum, second people answer my ask in previous community, this was optimize by compiler. can there is any config for it, to don't optimize samples things?

 

#include <iostream>
extern "C" {
    int sum(unsigned char s1 = 10, int s3 = 25) {
    s3 = s1 * (s3);
 }
}

int main() {
    int y = 50;
    int x = 50;
    return 0;
}
  

 


ENCONTREI ESTE Start 
 
_int64 start()
{
  unk_407610 = 0;
  sub_401660();
  return sub_401180();
}
 
ENCONTREI ESTE MAIN
 
.text:0000000000402C10 ; int __cdecl main(int argc, const char **argv, const char **envp)
.text:0000000000402C10 main            proc near               ; CODE XREF: sub_401180+242p
.text:0000000000402C10                                         ; DATA XREF: .pdata:0000000000405258o ...
.text:0000000000402C10                 sub     rsp, 28h
.text:0000000000402C14                 call    sub_401620
.text:0000000000402C19                 xor     eax, eax
.text:0000000000402C1B                 add     rsp, 28h
.text:0000000000402C1F                 retn
.text:0000000000402C1F main            endp
.text:0000000000402C1F
 
 
.text:0000000000401620 sub_401620      proc near               ; CODE XREF: sub_401180+215p
.text:0000000000401620                                         ; main+4p
.text:0000000000401620                 mov     eax, cs:dword_407040
.text:0000000000401626                 test    eax, eax
.text:0000000000401628                 jz      short loc_401630
.text:000000000040162A                 retn

 

 

only now i am see that sum not have a return, i even not know as it  have been compiled

Edited by Naelson

2 answers to this question

Recommended Posts

  • 0
Posted

you have 2 options to control compiler optimizations

 

using pragma directive, at the top of a file you don't want anything inside optimized

#pragma optimize("", off)

 

using project configuration

right click the project, properties -> configuration properties -> c/c++ -> optimization -> set optimization to disabled

 

though tbh i'm not sure it will ever not optimize instructions that have static values at compile time, never bothered trying

  • Upvote 1
  • 0
Posted
On 1/13/2022 at 2:03 AM, Anarchy said:

you have 2 options to control compiler optimizations

 

using pragma directive, at the top of a file you don't want anything inside optimized

#pragma optimize("", off)

 

using project configuration

right click the project, properties -> configuration properties -> c/c++ -> optimization -> set optimization to disabled

 

though tbh i'm not sure it will ever not optimize instructions that have static values at compile time, never bothered trying

project, properties -> configuration properties -> c/c++ -> optimization -> set optimization to disabled 👊

 

 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Posts

    • This post originally appeared on MmoGah. Dear exiles, hot news about PoE 1! The new league, 3.27 Keepers of the Flame, will launch on Oct 31, 2025. I will share with you the top 6 league starters, and each build is chosen for its strength in early progression, affordability, and synergy with the new mechanics introduced in the Bloodline Ascendancy system and Breach rework.       1. Exsanguinate Reap Mines Trickster Overview This build combines the physical spell damage of Exsanguinate and Reap with the mine playstyle, leveraging Trickster’s energy shield and recovery mechanics for survivability and speed. It’s a hybrid between trapper and spellcaster, offering high burst damage and smooth mapping. Key Mechanics Ascendancy: Trickster (Shadow) Main Skills: Exsanguinate, Reap, High-Impact Mine Support Defenses: Energy Shield, Evasion, Ghost Dance, Spell Suppression Strengths Excellent clear speed with overlapping AoE Strong single-target burst from Reap Trickster’s recovery and mobility make it forgiving Weaknesses Mines require setup and can feel clunky for some Physical damage scaling needs investment for the endgame Playstyle Tips Use Exsanguinate for mapping and Reap for bosses Prioritize mine throwing speed and recovery nodes Utilize Bloodline Grafts to enhance ES sustain and mine damage Ideal For Players who enjoy tactical gameplay with high burst potential   2. Cyclone Shockwave Slayer Overview Cyclone Shockwave Slayer is a melee build that uses Cyclone to trigger Shockwave Support, creating massive AoE explosions. Slayer’s leech and overleech mechanics make it durable and fast-paced. Key Mechanics Ascendancy: Slayer (Duelist) Main Skills: Cyclone, Shockwave Support, Rage Support Defenses: Life leech, Overleech, Fortify Strengths Smooth and fast mapping with Cyclone Shockwave adds huge AoE and damage Slayer’s leech makes it tanky even with minimal gear Weaknesses Requires a decent weapon early on Single-target can lag without investment Playstyle Tips Stack attack speed and physical damage Use Rage and Berserk for burst phases Bloodline Grafts can boost leech and AoE scaling Ideal For Players who love fast, aggressive melee builds   DID YOU KNOW?  MmoGah is the most trustworthy digital game goods store. Here you can buy safe PoE currency 3.27 to hold your strong build easily with low prices and fast delivery. poe currency 3.27     3. Rolling Magma Mines Saboteur Overview Rolling Magma Mines Saboteur is a powerful hybrid build that uses mines to trigger chain explosions. Saboteur’s mine bonuses and trap scaling make this build extremely potent for both clear and bossing. Key Mechanics Ascendancy: Saboteur (Shadow) Main Skills: Rolling Magma, Mine Support, Chain Support Defenses: Evasion, Spell Suppression, Mine immunity Strengths Massive AoE clear with chain mechanics High uptime on damage due to mine detonation Saboteur’s trap/mine bonuses make leveling easy Weaknesses Mines require setup and timing Visual clutter can be overwhelming Playstyle Tips Use Rolling Magma for chain clear and boss stacking Prioritize mine throwing speed and detonation speed Bloodline Grafts can enhance mine damage and trap cooldowns Ideal For Players who enjoy strategic, explosive gameplay   4. Kinetic Rain Elementalist (NEW) Overview Kinetic Rain is a new skill introduced in 3.27, firing a barrage of projectiles that rain down in an arc. Elementalist synergizes with elemental damage and ailment proliferation, making this build a top-tier mapper. Key Mechanics Ascendancy: Elementalist (Witch) Main Skills: Kinetic Rain, Greater Multiple Projectiles, Elemental Proliferation Defenses: Elemental ailment immunity, high life, block Strengths Incredible clear speed with projectile spread Elementalist’s golems and ailment immunity boost survivability New skill offers fresh playstyle and visuals Weaknesses Single-target depends on projectile overlap Requires investment in projectile speed and damage Playstyle Tips Scale elemental damage and projectile modifiers Use golems for buffs and tanking Bloodline Grafts can enhance elemental spread and projectile count Ideal For Players who want to try new mechanics with flashy visuals   5. Poisonous Concoction of Bouncing Slayer/Pathfinder Overview: This build uses Poisonous Concoction with the new “Bouncing” mechanic, allowing projectiles to ricochet and apply poison multiple times. Slayer and Pathfinder both offer strong synergy—Slayer for leech and Pathfinder for flask sustain. Key Mechanics Ascendancy: Slayer or Pathfinder (Duelist/Ranger) Main Skills: Poisonous Concoction, Plague Bearer, Wither Defenses: Evasion, Spell Suppression, Flask sustain Strengths Great single-target with poison stacking Bouncing mechanic improves clear and coverage No weapon required—uses flasks for scaling Weaknesses Flask management is crucial Visual clarity can be messy in dense fights Playstyle Tips Use Plague Bearer for clear and Poisonous Concoction for bosses Pathfinder offers smoother sustain; Slayer offers better leech Bloodline Grafts can boost poison duration and flask effects Ideal For Players who enjoy chaos builds and flask mechanics   6. Righteous Fire Chieftain Overview Righteous Fire Chieftain is a tanky, fire-based build that burns enemies with a persistent aura. Chieftain’s fire scaling and regen make it a great starter, especially with Breach-heavy content. Key Mechanics Ascendancy: Chieftain (Marauder) Main Skills: Righteous Fire, Fire Trap, Shield Charge Defenses: High life regen, fire resistance, armor Strengths Extremely tanky and consistent Great for Breach and dense packs Easy to gear and level Weaknesses Requires fire resistance and regen early Slower movement compared to zoomy builds Playstyle Tips Use Fire Trap for single-target and RF for clear Stack life, regen, and fire damage Bloodline Grafts can enhance burning damage and regen Ideal For Players who want a durable, low-maintenance build   Final Thoughts & Tips Bloodline Ascendancy: Mix and match ascendancy traits to create hybrid powerhouses. For example, combining Saboteur’s mine bonuses with Trickster’s recovery can yield unique builds. Breach Rework: Builds with strong AoE and sustain (like RF and Cyclone) excel in Breach-heavy zones. Leveling Strategy: Use alternate skills early (e.g., Fire Trap, Explosive Trap) and transition once gear is available. SSF vs Trade League: All builds here are viable in SSF, but some (like Poisonous Concoction and RF) are especially strong due to low gear dependency. Whether you prefer tactical mines, explosive melee, or elemental barrages, PoE 3.27 offers a rich meta with exciting new tools.
    • Some new features that we added: - 2 new quests - PvP Arena (to get hero status) Olympiad is disabled - Love Event - Dressme for armor/weapons/accessories - HWID Protection - More monsters - New farm zone - New autofarm system (works almost like adrenaline) - Auto enchant - Auto augment - 3 levels of armors - 3 levels of weapons - Anti KS System - Rebirth Manager - 30 days checking rewards - Small event (daily checking with small reward for all online players)
    • Added FloodProtector utility to prevent packet flooding for actions like item use and dice rolling. Integrated flood protection checks in relevant client packet handlers and registered/removal hooks in player lifecycle. Updated movement logic in L2PcInstance for improved position synchronization and geodata handling. Minor fixes and refactoring in attack logic, private store handling, and admin NPC editing. Refactored AI classes to enhance movement, attack, and skill usage logic for characters and mobs. Improved distance checks, attack range calculations, and skill casting conditions. Removed unused intention command logic from L2CharacterAI. Updated configuration to enable CellPathFinding. Minor code cleanups and bug fixes for more reliable AI behavior. Enhanced GeoPathFinding with detailed debug and error messages for region loading, including success/failure counts and file checks. Refactored L2AttackableAI and L2CharacterAI to improve attack range tolerance, immediate attack behavior, and added safety checks for missing targets. Updated configuration to disable CellPathFinding by default and added a new ShowRedName option for aggressive mobs. Minor config and log updates included. Applied TCP socket optimizations (e.g., TCP_NODELAY, buffer sizes, keepalive) in ClientThread, Connection, and SelectorThread to reduce latency and improve throughput. Enhanced L2AttackableAI with better random walk, aggro, and attack logic, including silent move checks, quest monster handling, and improved faction/raid/minion behavior. Added silent move support to L2PlayableInstance and quest monster flag to L2NpcTemplate/L2NpcInstance. These changes aim to improve server responsiveness, AI realism, and overall stability.
    • I’ve been using this Escape from Tarkov Hack for about a week now with no issues at all. ESP works great without any lag, and the aimbot is smooth and doesn't feel obvious. Had a quick setup with the loader, and support answered my questions right away. The HWID spoofer also did its job without messing with my system. So far, the cheat's staying undetected on my side.
  • Topics

×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock