diff --git a/indra/llappearance/lldriverparam.cpp b/indra/llappearance/lldriverparam.cpp
index f49ad9826fba254cbecd9e5862e374c4b68976c4..062f9ceddea48177ac1a1ba7735180e7332d7b31 100644
--- a/indra/llappearance/lldriverparam.cpp
+++ b/indra/llappearance/lldriverparam.cpp
@@ -232,19 +232,19 @@ void LLDriverParam::setWeight(F32 weight)
 	//-------|----|-------|----|-------> driver
 	//  | min1   max1    max2  min2
 
-	for( entry_list_t::iterator iter = mDriven.begin(); iter != mDriven.end(); iter++ )
+	for(LLDrivenEntry& driven : mDriven )
 	{
-		LLDrivenEntry* driven = &(*iter);
-		LLDrivenEntryInfo* info = driven->mInfo;
+		LLDrivenEntryInfo* info = driven.mInfo;
+		LLViewerVisualParam* driven_param = driven.mParam;
 		
 		F32 driven_weight = 0.f;
-		F32 driven_min = driven->mParam->getMinWeight();
-		F32 driven_max = driven->mParam->getMaxWeight();
+		F32 driven_min = driven_param->getMinWeight();
+		F32 driven_max = driven_param->getMaxWeight();
 
 		if (mIsAnimating)
 		{
 			// driven param doesn't interpolate (textures, for example)
-			if (!driven->mParam->getAnimating())
+			if (!driven_param->getAnimating())
 			{
 				continue;
 			}
@@ -268,7 +268,7 @@ void LLDriverParam::setWeight(F32 weight)
 					driven_weight = driven_min;
 				}
 				
-				setDrivenWeight(driven,driven_weight);
+				setDrivenWeight(&driven,driven_weight);
 				continue;
 			}
 			else 
@@ -292,13 +292,13 @@ void LLDriverParam::setWeight(F32 weight)
 					driven_weight = driven_min;
 				}
 
-				setDrivenWeight(driven,driven_weight);
+				setDrivenWeight(&driven,driven_weight);
 				continue;
 			}
 		}
 
-		driven_weight = getDrivenWeight(driven, mCurWeight);
-		setDrivenWeight(driven,driven_weight);
+		driven_weight = getDrivenWeight(&driven, mCurWeight);
+		setDrivenWeight(&driven,driven_weight);
 	}
 }
 
diff --git a/indra/llappearance/llpolymorph.cpp b/indra/llappearance/llpolymorph.cpp
index 66e9751f0622a81a012867ffc38745e0cf9d6ab6..3f0423fc498921cb0c00ce4a62b5e898ef3c8f3e 100644
--- a/indra/llappearance/llpolymorph.cpp
+++ b/indra/llappearance/llpolymorph.cpp
@@ -555,11 +555,11 @@ void LLPolyMorphTarget::apply( ESex avatar_sex )
 	// Check for NaN condition (NaN is detected if a variable doesn't equal itself.
 	if (mCurWeight != mCurWeight)
 	{
-		mCurWeight = 0.0;
+		mCurWeight = 0.0f;
 	}
 	if (mLastWeight != mLastWeight)
 	{
-		mLastWeight = mCurWeight+.001;
+		mLastWeight = mCurWeight+0.001f;
 	}
 
 	// perform differential update of morph
diff --git a/indra/llappearance/llwearable.cpp b/indra/llappearance/llwearable.cpp
index 6079913a8e76c46c9cda9f35fd05dea0870553ee..e3565ee45044518e24647379b504e2ed66bb724b 100644
--- a/indra/llappearance/llwearable.cpp
+++ b/indra/llappearance/llwearable.cpp
@@ -672,9 +672,10 @@ void LLWearable::addVisualParam(LLVisualParam *param)
 
 void LLWearable::setVisualParamWeight(S32 param_index, F32 value)
 {
-	if( is_in_map(mVisualParamIndexMap, param_index ) )
+	auto iter = mVisualParamIndexMap.find(param_index);
+	if(iter != mVisualParamIndexMap.end())
 	{
-		LLVisualParam *wearable_param = mVisualParamIndexMap[param_index];
+		LLVisualParam *wearable_param = iter->second;
 		wearable_param->setWeight(value);
 	}
 	else
@@ -685,16 +686,17 @@ void LLWearable::setVisualParamWeight(S32 param_index, F32 value)
 
 F32 LLWearable::getVisualParamWeight(S32 param_index) const
 {
-	if( is_in_map(mVisualParamIndexMap, param_index ) )
+	auto iter = mVisualParamIndexMap.find(param_index);
+	if(iter != mVisualParamIndexMap.end())
 	{
-		const LLVisualParam *wearable_param = mVisualParamIndexMap.find(param_index)->second;
+		const LLVisualParam *wearable_param = iter->second;
 		return wearable_param->getWeight();
 	}
 	else
 	{
 		LL_WARNS() << "LLWerable::getVisualParam passed invalid parameter index: "  << param_index << " for wearable type: " << this->getName() << LL_ENDL;
 	}
-	return (F32)-1.0;
+	return (F32)-1.0f;
 }
 
 LLVisualParam* LLWearable::getVisualParam(S32 index) const
@@ -718,11 +720,9 @@ void LLWearable::getVisualParams(visual_param_vec_t &list)
 
 void LLWearable::animateParams(F32 delta)
 {
-	for(visual_param_index_map_t::iterator iter = mVisualParamIndexMap.begin();
-		 iter != mVisualParamIndexMap.end();
-		 ++iter)
+	for(const auto& param_pair : mVisualParamIndexMap)
 	{
-		LLVisualParam *param = (LLVisualParam*) iter->second;
+		LLVisualParam *param = (LLVisualParam*)param_pair.second;
 		param->animate(delta);
 	}
 }
@@ -762,7 +762,8 @@ void LLWearable::writeToAvatar(LLAvatarAppearance* avatarp)
 	{
 		// cross-wearable parameters are not authoritative, as they are driven by a different wearable. So don't copy the values to the
 		// avatar object if cross wearable. Cross wearable params get their values from the avatar, they shouldn't write the other way.
-		if( (((LLViewerVisualParam*)param)->getWearableType() == mType) && (!((LLViewerVisualParam*)param)->getCrossWearable()) )
+		LLViewerVisualParam* viewer_param = (LLViewerVisualParam*)param;
+		if((viewer_param->getWearableType() == mType) && (!viewer_param->getCrossWearable()) )
 		{
 			S32 param_id = param->getID();
 			F32 weight = getVisualParamWeight(param_id);
diff --git a/indra/llcharacter/llanimationstates.cpp b/indra/llcharacter/llanimationstates.cpp
index c16cae1bbc7237eec62fcf9aaa1fded4489e71ba..ba771c92d967b0b06cb20e1818849b4ccd12f5cb 100644
--- a/indra/llcharacter/llanimationstates.cpp
+++ b/indra/llcharacter/llanimationstates.cpp
@@ -355,9 +355,10 @@ const char *LLAnimationLibrary::animStateToString( const LLUUID& state )
 	{
 		return NULL;
 	}
-	if (mAnimMap.count(state))
+	auto it = mAnimMap.find(state);
+	if (it != mAnimMap.end())
 	{
-		return mAnimMap[state];
+		return it->second;
 	}
 
 	return NULL;
diff --git a/indra/llcharacter/llanimationstates.h b/indra/llcharacter/llanimationstates.h
index 79cbcabdc1da0e72ad4c4fd6544cf2ebc2f288bd..1b13a0bf54446f30ac384b7f5565aea45527e88e 100644
--- a/indra/llcharacter/llanimationstates.h
+++ b/indra/llcharacter/llanimationstates.h
@@ -28,6 +28,7 @@
 #define LL_LLANIMATIONSTATES_H
 
 #include <map>
+#include <boost/unordered_map.hpp>
 
 #include "llstringtable.h"
 #include "lluuid.h"
@@ -203,7 +204,7 @@ class LLAnimationLibrary
 private:
 	LLStringTable mAnimStringTable;
 
-	typedef std::map<LLUUID, char *> anim_map_t;
+	typedef boost::unordered_map<LLUUID, char *> anim_map_t;
 	anim_map_t mAnimMap;
 
 public:
diff --git a/indra/llcharacter/llcharacter.cpp b/indra/llcharacter/llcharacter.cpp
index b764ef0c7e1f206abe615efe2f17e4c7418de877..3d2586dac887a9e4833c70922f4350930c26b6f3 100644
--- a/indra/llcharacter/llcharacter.cpp
+++ b/indra/llcharacter/llcharacter.cpp
@@ -263,7 +263,7 @@ void LLCharacter::dumpCharacter( LLJoint* joint )
 //-----------------------------------------------------------------------------
 // setAnimationData()
 //-----------------------------------------------------------------------------
-void LLCharacter::setAnimationData(std::string name, void *data)
+void LLCharacter::setAnimationData(const std::string& name, void *data)
 {
 	mAnimationData[name] = data;
 }
@@ -271,7 +271,7 @@ void LLCharacter::setAnimationData(std::string name, void *data)
 //-----------------------------------------------------------------------------
 // getAnimationData()
 //-----------------------------------------------------------------------------
-void* LLCharacter::getAnimationData(std::string name)
+void* LLCharacter::getAnimationData(const std::string& name)
 {
 	return get_if_there(mAnimationData, name, (void*)NULL);
 }
@@ -279,7 +279,7 @@ void* LLCharacter::getAnimationData(std::string name)
 //-----------------------------------------------------------------------------
 // removeAnimationData()
 //-----------------------------------------------------------------------------
-void LLCharacter::removeAnimationData(std::string name)
+void LLCharacter::removeAnimationData(const std::string& name)
 {
 	mAnimationData.erase(name);
 }
diff --git a/indra/llcharacter/llcharacter.h b/indra/llcharacter/llcharacter.h
index 2fac5f53a6552af5aa623e9d1ceaa7e609cdd889..f30db74676d4fc174155074b41a16956a91a0c66 100644
--- a/indra/llcharacter/llcharacter.h
+++ b/indra/llcharacter/llcharacter.h
@@ -39,6 +39,8 @@
 #include "llpointer.h"
 #include "llrefcount.h"
 
+#include <boost/unordered_map.hpp>
+
 class LLPolyMesh;
 
 class LLPauseRequestHandle : public LLThreadSafeRefCount
@@ -181,11 +183,11 @@ class LLCharacter
 
 	virtual S32 getCollisionVolumeID(std::string &name) { return -1; }
 
-	void setAnimationData(std::string name, void *data);
+	void setAnimationData(const std::string& name, void *data);
 	
-	void *getAnimationData(std::string name);
+	void *getAnimationData(const std::string& name);
 
-	void removeAnimationData(std::string name);
+	void removeAnimationData(const std::string& name);
 	
 	void addVisualParam(LLVisualParam *param);
 	void addSharedVisualParam(LLVisualParam *param);
@@ -237,11 +239,10 @@ class LLCharacter
 	}
 	S32 getVisualParamID(LLVisualParam *id)
 	{
-		visual_param_index_map_t::iterator iter;
-		for (iter = mVisualParamIndexMap.begin(); iter != mVisualParamIndexMap.end(); iter++)
+		for (const auto& param_pair : mVisualParamIndexMap)
 		{
-			if (iter->second == id)
-				return iter->first;
+			if (param_pair.second == id)
+				return param_pair.first;
 		}
 		return 0;
 	}
@@ -267,7 +268,7 @@ class LLCharacter
 protected:
 	LLMotionController	mMotionController;
 
-	typedef std::map<std::string, void *> animation_data_map_t;
+	typedef boost::unordered_map<std::string, void *> animation_data_map_t;
 	animation_data_map_t mAnimationData;
 
 	F32					mPreferredPelvisHeight;
diff --git a/indra/llcharacter/llkeyframemotion.h b/indra/llcharacter/llkeyframemotion.h
index c32212db507b17f84616195675a74eb075613725..6f50e363daf3e1ec438285b04e703c53c1892b22 100644
--- a/indra/llcharacter/llkeyframemotion.h
+++ b/indra/llcharacter/llkeyframemotion.h
@@ -442,7 +442,7 @@ class LLKeyframeDataCache
 	LLKeyframeDataCache(){};
 	~LLKeyframeDataCache();
 
-	typedef std::map<LLUUID, class LLKeyframeMotion::JointMotionList*> keyframe_data_map_t; 
+	typedef boost::unordered_map<LLUUID, class LLKeyframeMotion::JointMotionList*> keyframe_data_map_t; 
 	static keyframe_data_map_t sKeyframeDataMap;
 
 	static void addKeyframeData(const LLUUID& id, LLKeyframeMotion::JointMotionList*);
diff --git a/indra/llcharacter/llmotioncontroller.cpp b/indra/llcharacter/llmotioncontroller.cpp
index afc5f4875e59fa745df4da9de3e9ea01d40249b6..04bca84af895e69804918d55741fd6e7e7cdd2a5 100644
--- a/indra/llcharacter/llmotioncontroller.cpp
+++ b/indra/llcharacter/llmotioncontroller.cpp
@@ -206,32 +206,27 @@ void LLMotionController::purgeExcessMotions()
 		}
 	}
 
-	std::set<LLUUID> motions_to_kill;
+	std::vector<LLUUID> motions_to_kill;
+	motions_to_kill.reserve(100);
 	if (mLoadedMotions.size() > MAX_MOTION_INSTANCES)
 	{
 		// too many motions active this frame, kill all blenders
 		mPoseBlender.clearBlenders();
-		for (motion_set_t::iterator loaded_motion_it = mLoadedMotions.begin(); 
-			 loaded_motion_it != mLoadedMotions.end(); 
-			 ++loaded_motion_it)
+		for (LLMotion* cur_motionp : mLoadedMotions)
 		{
-			LLMotion* cur_motionp = *loaded_motion_it;
 			// motion isn't playing, delete it
 			if (!isMotionActive(cur_motionp))
 			{
-				motions_to_kill.insert(cur_motionp->getID());
+				motions_to_kill.push_back(cur_motionp->getID());
 			}
 		}
 	}
 	
 	// clean up all inactive, loaded motions
-	for (std::set<LLUUID>::iterator motion_it = motions_to_kill.begin();
-		motion_it != motions_to_kill.end();
-		++motion_it)
+	for (const LLUUID& motion_id : motions_to_kill)
 	{
 		// look up the motion again by ID to get canonical instance
 		// and kill it only if that one is inactive
-		LLUUID motion_id = *motion_it;
 		LLMotion* motionp = findMotion(motion_id);
 		if (motionp && !isMotionActive(motionp))
 		{
@@ -563,11 +558,8 @@ void LLMotionController::updateMotionsByType(LLMotion::LLMotionBlendType anim_ty
 	memset(&last_joint_signature, 0, sizeof(U8) * LL_CHARACTER_MAX_ANIMATED_JOINTS);
 
 	// iterate through active motions in chronological order
-	for (motion_list_t::iterator iter = mActiveMotions.begin();
-		 iter != mActiveMotions.end(); )
+	for (LLMotion* motionp : mActiveMotions)
 	{
-		motion_list_t::iterator curiter = iter++;
-		LLMotion* motionp = *curiter;
 		if (motionp->getBlendType() != anim_type)
 		{
 			continue;
@@ -1114,10 +1106,9 @@ void LLMotionController::flushAllMotions()
 	mCharacter->removeAnimationData("Hand Pose");
 
 	// restart motions
-	for (std::vector<std::pair<LLUUID,F32> >::iterator iter = active_motions.begin();
-		 iter != active_motions.end(); ++iter)
+	for (const auto& motion_pair : active_motions)
 	{
-		startMotion(iter->first, iter->second);
+		startMotion(motion_pair.first, motion_pair.second);
 	}
 }
 
diff --git a/indra/llcharacter/llmotioncontroller.h b/indra/llcharacter/llmotioncontroller.h
index 637ee4d2bba7122dfe749665bfb7de7297ce6ecb..7b5c29699e8e48ccd5a6c964c2595ab6a91cd2bf 100644
--- a/indra/llcharacter/llmotioncontroller.h
+++ b/indra/llcharacter/llmotioncontroller.h
@@ -40,6 +40,8 @@
 #include "llstatemachine.h"
 #include "llstring.h"
 
+#include <boost/unordered_map.hpp>
+
 //-----------------------------------------------------------------------------
 // Class predeclaration
 // This is necessary because llcharacter.h includes this file.
@@ -73,7 +75,7 @@ class LLMotionRegistry
 
 
 protected:
-	typedef std::map<LLUUID, LLMotionConstructor> motion_map_t;
+	typedef boost::unordered_map<LLUUID, LLMotionConstructor> motion_map_t;
 	motion_map_t mMotionTable;
 };
 
@@ -208,7 +210,7 @@ class LLMotionController
 //	Once an animations is loaded, it will be initialized and put on the mLoadedMotions list.
 //	Any animation that is currently playing also sits in the mActiveMotions list.
 
-	typedef std::map<LLUUID, LLMotion*> motion_map_t;
+	typedef boost::unordered_map<LLUUID, LLMotion*> motion_map_t;
 	motion_map_t	mAllMotions;
 
 	motion_set_t		mLoadingMotions;
diff --git a/indra/llcharacter/llpose.cpp b/indra/llcharacter/llpose.cpp
index fc95fafd61490f81a3b8494afdc4bc5ce24a2ea8..9ce32ebc31832d54f5c54e7b8ce8d5880f72580f 100644
--- a/indra/llcharacter/llpose.cpp
+++ b/indra/llcharacter/llpose.cpp
@@ -478,7 +478,8 @@ BOOL LLPoseBlender::addMotion(LLMotion* motion)
 	{
 		LLJoint *jointp = jsp->getJoint();
 		LLJointStateBlender* joint_blender;
-		if (mJointStateBlenderPool.find(jointp) == mJointStateBlenderPool.end())
+		auto joint_iter = mJointStateBlenderPool.find(jointp);
+		if (joint_iter == mJointStateBlenderPool.end())
 		{
 			// this is the first time we are animating this joint
 			// so create new jointblender and add it to our pool
@@ -487,7 +488,7 @@ BOOL LLPoseBlender::addMotion(LLMotion* motion)
 		}
 		else
 		{
-			joint_blender = mJointStateBlenderPool[jointp];
+			joint_blender = joint_iter->second;
 		}
 
 		if (jsp->getPriority() == LLJoint::USE_MOTION_PRIORITY)
@@ -513,10 +514,8 @@ BOOL LLPoseBlender::addMotion(LLMotion* motion)
 //-----------------------------------------------------------------------------
 void LLPoseBlender::blendAndApply()
 {
-	for (blender_list_t::iterator iter = mActiveBlenders.begin();
-		 iter != mActiveBlenders.end(); )
+	for (LLJointStateBlender* jsbp : mActiveBlenders)
 	{
-		LLJointStateBlender* jsbp = *iter++;
 		jsbp->blendJointStates();
 	}
 
diff --git a/indra/llcommon/llerror.cpp b/indra/llcommon/llerror.cpp
index 42782c852fb0609bc0ee9808269c4013f4e8e8c7..6a332054475f8d2c2089ea4a6927728976c8d970 100644
--- a/indra/llcommon/llerror.cpp
+++ b/indra/llcommon/llerror.cpp
@@ -44,7 +44,7 @@
 # include <io.h>
 #endif // !LL_WINDOWS
 #include <vector>
-#include <unordered_map>
+#include <boost/unordered_map.hpp>
 #include "string.h"
 
 #include "llapp.h"
@@ -498,7 +498,7 @@ namespace LLError
 		LevelMap                            mClassLevelMap;
 		LevelMap                            mFileLevelMap;
 		LevelMap                            mTagLevelMap;
-		std::unordered_map<std::string, unsigned int> mUniqueLogMessages;
+		boost::unordered_map<std::string, unsigned int> mUniqueLogMessages;
 		
 		LLError::FatalFunction              mCrashFunction;
 		LLError::TimeFunction               mTimeFunction;
diff --git a/indra/llcommon/llfasttimer.cpp b/indra/llcommon/llfasttimer.cpp
index 08ea668964eec0e1fb18e1e8f22405dd37c7f429..67b247315c4c9fc37e11bf9d7f6d3884e5e2c1eb 100644
--- a/indra/llcommon/llfasttimer.cpp
+++ b/indra/llcommon/llfasttimer.cpp
@@ -221,8 +221,8 @@ void BlockTimer::bootstrapTimerTree()
 // this preserves partial order derived from current frame's observations
 void BlockTimer::incrementalUpdateTimerTree()
 {
-	for(block_timer_tree_df_post_iterator_t it = begin_block_timer_tree_df_post(BlockTimer::getRootTimeBlock());
-		it != end_block_timer_tree_df_post();
+	for(block_timer_tree_df_post_iterator_t it = begin_block_timer_tree_df_post(BlockTimer::getRootTimeBlock()), end = end_block_timer_tree_df_post();
+		it != end;
 		++it)
 	{
 		BlockTimerStatHandle* timerp = *it;
@@ -391,8 +391,8 @@ void BlockTimer::dumpCurTimes()
 	LLTrace::Recording& last_frame_recording = frame_recording.getLastRecording();
 
 	// walk over timers in depth order and output timings
-	for(block_timer_tree_df_iterator_t it = begin_timer_tree(BlockTimer::getRootTimeBlock());
-		it != end_timer_tree();
+	for(block_timer_tree_df_iterator_t it = begin_timer_tree(BlockTimer::getRootTimeBlock()), end = end_timer_tree();
+		it != end;
 		++it)
 	{
 		BlockTimerStatHandle* timerp = (*it);
diff --git a/indra/llmath/tests/v3dmath_test.cpp b/indra/llmath/tests/v3dmath_test.cpp
index c4744e1b2543e4bb0294b96152980e6f41a3786c..930ea52b7fe5c255c4506ec03dba7679b01c42a0 100644
--- a/indra/llmath/tests/v3dmath_test.cpp
+++ b/indra/llmath/tests/v3dmath_test.cpp
@@ -504,9 +504,6 @@ namespace tut
 	template<> template<>
 	void v3dmath_object::test<24>()
 	{
-#if LL_WINDOWS && _MSC_VER < 1400
-		skip("This fails on VS2003!");
-#else
 		F64 x = 10., y = 20., z = -15.;
 		F64 angle1, angle2;
 		LLVector3d vec3Da(x,y,z), vec3Db(x,y,z);
@@ -520,12 +517,6 @@ namespace tut
 		vec3Da.normVec();
 		F64 angle = vec3Db*vec3Da;
 		angle = acos(angle);
-#if LL_WINDOWS && _MSC_VER > 1900
-		skip("This fails on VS2017!");
-#else
 		ensure("2:angle_between: Fail ", (angle == angle2));
-#endif
-		
-#endif
 	}
 }
diff --git a/indra/llmessage/llavatarnamecache.cpp b/indra/llmessage/llavatarnamecache.cpp
index c8691457e2c19a8a9518210885386d79a1286e86..7eeb3982c7f3a96824633f7476603c3a9de7c227 100644
--- a/indra/llmessage/llavatarnamecache.cpp
+++ b/indra/llmessage/llavatarnamecache.cpp
@@ -251,7 +251,7 @@ void LLAvatarNameCache::handleAvNameCacheSuccess(const LLSD &data, const LLSD &h
 // Provide some fallback for agents that return errors
 void LLAvatarNameCache::handleAgentError(const LLUUID& agent_id)
 {
-	std::map<LLUUID,LLAvatarName>::iterator existing = mCache.find(agent_id);
+	auto existing = mCache.find(agent_id);
 	if (existing == mCache.end())
     {
         // there is no existing cache entry, so make a temporary name from legacy
@@ -376,9 +376,12 @@ void LLAvatarNameCache::legacyNameCallback(const LLUUID& agent_id,
 	// Retrieve the name and set it to never (or almost never...) expire: when we are using the legacy
 	// protocol, we do not get an expiration date for each name and there's no reason to ask the 
 	// data again and again so we set the expiration time to the largest value admissible.
-	std::map<LLUUID,LLAvatarName>::iterator av_record = LLAvatarNameCache::getInstance()->mCache.find(agent_id);
-	LLAvatarName& av_name = av_record->second;
-	av_name.setExpires(MAX_UNREFRESHED_TIME);
+	auto av_record = LLAvatarNameCache::getInstance()->mCache.find(agent_id);
+	if (av_record != LLAvatarNameCache::getInstance()->mCache.end())
+	{
+		LLAvatarName& av_name = av_record->second;
+		av_name.setExpires(MAX_UNREFRESHED_TIME);
+	}
 }
 
 void LLAvatarNameCache::legacyNameFetch(const LLUUID& agent_id,
@@ -589,7 +592,7 @@ bool LLAvatarNameCache::getName(const LLUUID& agent_id, LLAvatarName *av_name)
 	if (mRunning)
 	{
 		// ...only do immediate lookups when cache is running
-		std::map<LLUUID,LLAvatarName>::iterator it = mCache.find(agent_id);
+		auto it = mCache.find(agent_id);
 		if (it != mCache.end())
 		{
 			*av_name = it->second;
@@ -640,7 +643,7 @@ LLAvatarNameCache::callback_connection_t LLAvatarNameCache::getNameCallback(cons
 	if (mRunning)
 	{
 		// ...only do immediate lookups when cache is running
-		std::map<LLUUID,LLAvatarName>::iterator it = mCache.find(agent_id);
+		auto it = mCache.find(agent_id);
 		if (it != mCache.end())
 		{
 			const LLAvatarName& av_name = it->second;
@@ -731,9 +734,7 @@ void LLAvatarNameCache::insert(const LLUUID& agent_id, const LLAvatarName& av_na
 
 LLUUID LLAvatarNameCache::findIdByName(const std::string& name)
 {
-    std::map<LLUUID, LLAvatarName>::iterator it;
-    std::map<LLUUID, LLAvatarName>::iterator end = mCache.end();
-    for (it = mCache.begin(); it != end; ++it)
+    for (auto it = mCache.begin(), end = mCache.end(); it != end; ++it)
     {
         if (it->second.getUserName() == name)
         {
diff --git a/indra/llmessage/llavatarnamecache.h b/indra/llmessage/llavatarnamecache.h
index 6a4f73a6eb9ef0c21754e7e62aaa0dd1aeacfe27..70466d9c40ffee0c94dd4241661af228810974e9 100644
--- a/indra/llmessage/llavatarnamecache.h
+++ b/indra/llmessage/llavatarnamecache.h
@@ -28,13 +28,14 @@
 #ifndef LLAVATARNAMECACHE_H
 #define LLAVATARNAMECACHE_H
 
+#include "lluuid.h"
 #include "llavatarname.h"	// for convenience
 #include "llsingleton.h"
 #include <boost/signals2.hpp>
+#include <boost/unordered_map.hpp>
 #include <set>
 
 class LLSD;
-class LLUUID;
 
 class LLAvatarNameCache : public LLSingleton<LLAvatarNameCache>
 {
@@ -173,18 +174,18 @@ class LLAvatarNameCache : public LLSingleton<LLAvatarNameCache>
 
     // Agent IDs that have been requested, but with no reply.
     // Maps agent ID to frame time request was made.
-    typedef std::map<LLUUID, F64> pending_queue_t;
+    typedef boost::unordered_map<LLUUID, F64> pending_queue_t;
     pending_queue_t mPendingQueue;
 
     // Callbacks to fire when we received a name.
     // May have multiple callbacks for a single ID, which are
     // represented as multiple slots bound to the signal.
     // Avoid copying signals via pointers.
-    typedef std::map<LLUUID, callback_signal_t*> signal_map_t;
+    typedef boost::unordered_map<LLUUID, callback_signal_t*> signal_map_t;
     signal_map_t mSignalMap;
 
     // The cache at last, i.e. avatar names we know about.
-    typedef std::map<LLUUID, LLAvatarName> cache_t;
+    typedef boost::unordered_map<LLUUID, LLAvatarName> cache_t;
     cache_t mCache;
 
     // Time when unrefreshed cached names were checked last.
diff --git a/indra/llmessage/llmessagethrottle.cpp b/indra/llmessage/llmessagethrottle.cpp
index 579d6d718788a0f43515ea6280ed1124cdb3ff8a..98ae834b0d8b80bbc71bd9ecf767dc655b3f51f0 100644
--- a/indra/llmessage/llmessagethrottle.cpp
+++ b/indra/llmessage/llmessagethrottle.cpp
@@ -32,18 +32,8 @@
 #include "llframetimer.h"
 
 // This is used for the stl search_n function.
-#if _MSC_VER >= 1500 // VC9 has a bug in search_n
-struct eq_message_throttle_entry : public std::binary_function< LLMessageThrottleEntry, LLMessageThrottleEntry, bool >
-{
-	bool operator()(const LLMessageThrottleEntry& a, const LLMessageThrottleEntry& b) const
-	{
-		return a.getHash() == b.getHash();
-	}
-};
-#else
-bool eq_message_throttle_entry(LLMessageThrottleEntry a, LLMessageThrottleEntry b)
+bool eq_message_throttle_entry(const LLMessageThrottleEntry& a, const LLMessageThrottleEntry& b)
  		{ return a.getHash() == b.getHash(); }
-#endif
 
 const U64 SEC_TO_USEC = 1000000;
 		
@@ -118,14 +108,9 @@ BOOL LLMessageThrottle::addViewerAlert(const LLUUID& to, const std::string& mesg
 	LLMessageThrottleEntry entry(hash, LLFrameTimer::getTotalTime());
 
 	// Check if this message is already in the list.
-#if _MSC_VER >= 1500 // VC9 has a bug in search_n
-	// SJB: This *should* work but has not been tested yet *TODO: Test!
-	message_list_iterator_t found = std::find_if(message_list->begin(), message_list->end(),
-												 std::bind2nd(eq_message_throttle_entry(), entry));
-#else
- 	message_list_iterator_t found = std::search_n(message_list->begin(), message_list->end(),
- 												  1, entry, eq_message_throttle_entry);
-#endif
+	message_list_iterator_t found = std::search_n(message_list->begin(), message_list->end(),
+												  1, entry, eq_message_throttle_entry);
+
 	if (found == message_list->end())
 	{
 		// This message was not found.  Add it to the list.
@@ -152,14 +137,8 @@ BOOL LLMessageThrottle::addAgentAlert(const LLUUID& agent, const LLUUID& task, c
 	LLMessageThrottleEntry entry(hash, LLFrameTimer::getTotalTime());
 
 	// Check if this message is already in the list.
-#if _MSC_VER >= 1500 // VC9 has a bug in search_n
-	// SJB: This *should* work but has not been tested yet *TODO: Test!
-	message_list_iterator_t found = std::find_if(message_list->begin(), message_list->end(),
-												 std::bind2nd(eq_message_throttle_entry(), entry));
-#else
 	message_list_iterator_t found = std::search_n(message_list->begin(), message_list->end(),
 												  1, entry, eq_message_throttle_entry);
-#endif
 	
 	if (found == message_list->end())
 	{
diff --git a/indra/llrender/llfontfreetype.h b/indra/llrender/llfontfreetype.h
index 0d94458c096c94f12b848c76db1867908916b0de..9bf0c1480fca95ebddcdb30de3a0fb8425b3d453 100644
--- a/indra/llrender/llfontfreetype.h
+++ b/indra/llrender/llfontfreetype.h
@@ -27,7 +27,7 @@
 #ifndef LL_LLFONTFREETYPE_H
 #define LL_LLFONTFREETYPE_H
 
-#include <unordered_map>
+#include <boost/unordered_map.hpp>
 #include "llpointer.h"
 #include "llstl.h"
 
@@ -160,7 +160,7 @@ class LLFontFreetype final : public LLRefCount, public LLTrace::MemTrackable<LLF
 	bool getKerningCache(U32 left_glyph, U32 right_glyph, F32& kerning) const;
 	void setKerningCache(U32 left_glyph, U32 right_glyph, F32 kerning) const;
 
-	mutable std::unordered_map<U64, F32> mKerningCache;
+	mutable boost::unordered_map<U64, F32> mKerningCache;
 
 	std::string mName;
 
@@ -181,7 +181,7 @@ class LLFontFreetype final : public LLRefCount, public LLTrace::MemTrackable<LLF
 	BOOL mIsFallback;
 	font_vector_t mFallbackFonts; // A list of fallback fonts to look for glyphs in (for Unicode chars)
 
-	typedef std::unordered_map<llwchar, LLFontGlyphInfo*> char_glyph_info_map_t;
+	typedef boost::unordered_map<llwchar, LLFontGlyphInfo*> char_glyph_info_map_t;
 	mutable char_glyph_info_map_t mCharGlyphInfoMap; // Information about glyph location in bitmap
 
 	mutable LLFontBitmapCache* mFontBitmapCachep;
diff --git a/indra/llrender/llfontgl.cpp b/indra/llrender/llfontgl.cpp
index ca9f5df8ab3b172c742f05d767190ce777eccef7..fbb5841fb9bc86654e24cf4fcb194b5f26f87079 100644
--- a/indra/llrender/llfontgl.cpp
+++ b/indra/llrender/llfontgl.cpp
@@ -147,7 +147,7 @@ S32 LLFontGL::render(const LLWString &wstr, S32 begin_offset, const LLRectf& rec
 S32 LLFontGL::render(const LLWString &wstr, S32 begin_offset, F32 x, F32 y, const LLColor4 &color, HAlign halign, VAlign valign, U8 style, 
 					 ShadowType shadow, S32 max_chars, S32 max_pixels, F32* right_x, BOOL use_ellipses) const
 {
-	LL_RECORD_BLOCK_TIME(FTM_RENDER_FONTS);
+	//LL_RECORD_BLOCK_TIME(FTM_RENDER_FONTS);
 
 	if(!sDisplayFont) //do not display texts
 	{
diff --git a/indra/llrender/llvertexbuffer.cpp b/indra/llrender/llvertexbuffer.cpp
index 70ece124b4bc989c9f722739d6d853fe2ea897a5..d99a5753c8d5bafbfe418388b763d1e0a798c98f 100644
--- a/indra/llrender/llvertexbuffer.cpp
+++ b/indra/llrender/llvertexbuffer.cpp
@@ -569,7 +569,7 @@ void LLVertexBuffer::setupClientArrays(U32 data_mask)
 static LLTrace::BlockTimerStatHandle FTM_VB_DRAW_ARRAYS("drawArrays");
 void LLVertexBuffer::drawArrays(U32 mode, const std::vector<LLVector3>& pos, const std::vector<LLVector3>& norm)
 {
-	LL_RECORD_BLOCK_TIME(FTM_VB_DRAW_ARRAYS);
+	//LL_RECORD_BLOCK_TIME(FTM_VB_DRAW_ARRAYS);
 	llassert(!LLGLSLShader::sNoFixedFunction || LLGLSLShader::sCurBoundShaderPtr != NULL);
 	gGL.syncMatrices();
 
@@ -857,7 +857,7 @@ void LLVertexBuffer::drawArrays(U32 mode, U32 first, U32 count) const
 	}
 
 	{
-		LL_RECORD_BLOCK_TIME(FTM_GL_DRAW_ARRAYS);
+		//LL_RECORD_BLOCK_TIME(FTM_GL_DRAW_ARRAYS);
 		stop_glerror();
 		LLGLSLShader::startProfile();
 		stop_glerror();
@@ -2225,7 +2225,7 @@ bool LLVertexBuffer::bindGLArray()
 	if (mGLArray && sGLRenderArray != mGLArray)
 	{
 		{
-			LL_RECORD_BLOCK_TIME(FTM_BIND_GL_ARRAY);
+			//LL_RECORD_BLOCK_TIME(FTM_BIND_GL_ARRAY);
 #if GL_ARB_vertex_array_object
 			glBindVertexArray(mGLArray);
 #endif
@@ -2276,7 +2276,7 @@ bool LLVertexBuffer::bindGLIndices(bool force_bind)
 	bool ret = false;
 	if (useVBOs() && (force_bind || (mGLIndices && (mGLIndices != sGLRenderIndices || !sIBOActive))))
 	{
-		LL_RECORD_BLOCK_TIME(FTM_BIND_GL_INDICES);
+		//LL_RECORD_BLOCK_TIME(FTM_BIND_GL_INDICES);
 		/*if (sMapped)
 		{
 			LL_ERRS() << "VBO bound while another VBO mapped!" << LL_ENDL;
diff --git a/indra/llvfs/CMakeLists.txt b/indra/llvfs/CMakeLists.txt
index 67dce8c0737e7fda21ff4fb057451aeac2e1bc0f..ea0d7e498ea01ed026a6dc36169433bcb229c8ea 100644
--- a/indra/llvfs/CMakeLists.txt
+++ b/indra/llvfs/CMakeLists.txt
@@ -75,6 +75,10 @@ target_link_libraries(llvfs
     ${vfs_BOOST_LIBRARIES}
     )
 
+if (WINDOWS)
+  target_link_libraries(llvfs Shlwapi)
+endif (WINDOWS)
+
 if (DARWIN)
   include(CMakeFindFrameworks)
   find_library(COCOA_LIBRARY Cocoa)
diff --git a/indra/llvfs/lldir_win32.cpp b/indra/llvfs/lldir_win32.cpp
index aa9aa33af984cfa7a88d9e9f1f47cff311e0c166..73cbf77b17b95d44fda11a49232e183680768898 100644
--- a/indra/llvfs/lldir_win32.cpp
+++ b/indra/llvfs/lldir_win32.cpp
@@ -40,6 +40,7 @@
 #include <errno.h>
 #include <sys/types.h>
 #include <sys/stat.h>
+#include <shlwapi.h>
 
 // Utility stuff to get versions of the sh
 #define PACKVERSION(major,minor) MAKELONG(minor,major)
@@ -371,20 +372,9 @@ std::string LLDir_Win32::getCurPath()
 }
 
 
-bool LLDir_Win32::fileExists(const std::string &filename) const
+bool LLDir_Win32::fileExists(const std::string& filename) const
 {
-	llstat stat_data;
-	// Check the age of the file
-	// Now, we see if the files we've gathered are recent...
-	int res = LLFile::stat(filename, &stat_data);
-	if (!res)
-	{
-		return TRUE;
-	}
-	else
-	{
-		return FALSE;
-	}
+	return PathFileExists(ll_convert_string_to_wide(filename).c_str());
 }
 
 
diff --git a/indra/newview/llphysicsmotion.cpp b/indra/newview/llphysicsmotion.cpp
index 89382d66fd195c2c62190856f81e3b4b5356834f..87e66f3bb7a3c88706ca847e2c85164207fc9dd0 100644
--- a/indra/newview/llphysicsmotion.cpp
+++ b/indra/newview/llphysicsmotion.cpp
@@ -461,12 +461,9 @@ BOOL LLPhysicsMotionController::onUpdate(F32 time, U8* joint_mask)
         }
         
         BOOL update_visuals = FALSE;
-        for (motion_vec_t::iterator iter = mMotions.begin();
-             iter != mMotions.end();
-             ++iter)
+        for (LLPhysicsMotion* motion : mMotions)
         {
-                LLPhysicsMotion *motion = (*iter);
-                update_visuals |= motion->onUpdate(time);
+            update_visuals |= motion->onUpdate(time);
         }
                 
         if (update_visuals)
diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp
index 365ffc1184b31a37f28fc55b592463ca23935e82..d46d54ee2b7706648f51290cd1a3ffd162e1bfce 100644
--- a/indra/newview/llviewerobjectlist.cpp
+++ b/indra/newview/llviewerobjectlist.cpp
@@ -98,8 +98,8 @@ extern LLPipeline	gPipeline;
 
 // Statics for object lookup tables.
 U32						LLViewerObjectList::sSimulatorMachineIndex = 1; // Not zero deliberately, to speed up index check.
-std::unordered_map<U64, U32>		LLViewerObjectList::sIPAndPortToIndex;
-std::unordered_map<U64, LLUUID>	LLViewerObjectList::sIndexAndLocalIDToUUID;
+boost::unordered_map<U64, U32>		LLViewerObjectList::sIPAndPortToIndex;
+boost::unordered_map<U64, LLUUID>	LLViewerObjectList::sIndexAndLocalIDToUUID;
 
 LLViewerObjectList::LLViewerObjectList()
 {
diff --git a/indra/newview/llviewerobjectlist.h b/indra/newview/llviewerobjectlist.h
index 5ac11271c490f13c38008fbc0fa1b6a5f017050e..9f775ef6ac199a35b2165bf2552bb82c00fe8d5a 100644
--- a/indra/newview/llviewerobjectlist.h
+++ b/indra/newview/llviewerobjectlist.h
@@ -40,7 +40,7 @@
 #include "llcoros.h"
 
 // system includes
-#include <unordered_map>
+#include <boost/unordered_map.hpp>
 
 class LLCamera;
 class LLNetMap;
@@ -213,7 +213,7 @@ class LLViewerObjectList
 
     uuid_set_t   mDeadObjects;
 
-	std::unordered_map<LLUUID, LLPointer<LLViewerObject> > mUUIDObjectMap;
+	boost::unordered_map<LLUUID, LLPointer<LLViewerObject> > mUUIDObjectMap;
 
 	//set of objects that need to update their cost
     uuid_set_t   mStaleObjectCost;
@@ -228,9 +228,9 @@ class LLViewerObjectList
 	S32 mCurLazyUpdateIndex;
 
 	static U32 sSimulatorMachineIndex;
-	static std::unordered_map<U64, U32> sIPAndPortToIndex;
+	static boost::unordered_map<U64, U32> sIPAndPortToIndex;
 
-	static std::unordered_map<U64, LLUUID> sIndexAndLocalIDToUUID;
+	static boost::unordered_map<U64, LLUUID> sIndexAndLocalIDToUUID;
 
 	std::set<LLViewerObject *> mSelectPickList;